Skip to content

Dismiss screensaver on seat input and conceal idle lock handoff - #11746

Closed
Arash-Afshar wants to merge 2 commits into
omacom:quattrofrom
Arash-Afshar:fix/screensaver-dismiss-and-lock-handoff
Closed

Arash-Afshar wants to merge 2 commits into
omacom:quattrofrom
Arash-Afshar:fix/screensaver-dismiss-and-lock-handoff

Conversation

@Arash-Afshar

@Arash-Afshar Arash-Afshar commented Sep 13, 2026 •

Copy link
Copy Markdown

The idle screensaver only exited on a keypress in its terminal, and locking while it was up could flash the desktop before the lock UI appeared. This change dismisses the screensaver on compositor seat activity (pointer, touch, keyboard) after launch has settled, and keeps it mapped until a concealed lock surface is secure on every output before teardown.

Tests

Automated: test/shell.d/idle-test.sh (IdleModel launch-complete / dismiss-state cases), test/shell.d/idle-lock-handoff-test.sh (dismiss monitor, arm timer, lockFromIdle, concealed LockView, OWE poster/feed suppress, lock-timer stop on dismiss, and the 10s secure-wait deadline), test/shell.d/system-lock-test.sh, and test/shell.d/video-background-test.sh for conceal-aware feedActive / poster path.

VM verification is still outstanding: trackpad dismiss, touch dismiss, fingerprint unlock during the concealed handoff, and idle handoff with an OWE video lock wallpaper.

Architecture

The main IdleMonitor still starts the idle cycle (screensaver + lock timers). While org.omarchy.screensaver windows exist, a second short IdleMonitor is enabled only after launch is complete (windowCount >= monitorCount, or grace with ≥1 window) and not during lock handoff. Each new screensaver openwindow resets settle so sequential multi-monitor focus warps are not treated as user input. A 1.2s arm timer after launch-complete force-settles dismiss when a jittery pointer never stays idle long enough for the monitor alone.

dismissScreensaver() sets dismissInFlight and stops the screensaver and lock timers before it signals the screensaver supervisor. lockSystem() returns immediately while dismissal is in flight, so a deadline that was about to fire cannot start a lock while the covering windows are already coming down.

For lock, idle calls lockFromIdle, which enables concealed black lock surfaces (no wallpaper/password, blank cursor) before ext-session-lock. It polls until secure, then runs omarchy-system-lock cleanup so fingerprint unlock cannot race into a second lock request. If secure never arrives within 10 seconds, the wait exits and leaves the screensaver mapped. Pointer wake on the lock surface is ignored until a short post-secure settle; keyboard wake still reveals immediately. While concealed, LockView clears the poster/still path, keeps feedActive false so the OWE feed does not load, and hides the blur/darken layers and the fingerprint-unavailable notice.

@Arash-Afshar

Copy link
Copy Markdown
Author

Hey @omarchybot how do I get this PR reviewed and merged by @dhh and/or @ryanrhughes ?

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Adds seat-input dismissal and a concealed idle-to-lock handoff.

  • Screensavers dismiss on seat activity after launch settles.
  • Idle locking keeps the screensaver up until the lock is secure.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Screensaver visible] --> B{Seat input or lock deadline?}
  B -->|Seat input| C[Stop idle deadlines]
  C --> D[Dismiss screensaver]
  B -->|Lock deadline| E[Request concealed lock]
  E --> F{Lock reports secure?}
  F -->|Yes| G[Run cleanup without another lock request]
  F -->|Request ends or deadline expires| H[Leave screensaver mapped]
Loading

Reviews (6) · Last reviewed commit: "Run the idle lock handoff instead of mat..." · Reviewed by Greptile

Comment thread shell/plugins/services/idle/Service.qml Resolved
Comment thread shell/plugins/services/idle/Service.qml Resolved
Comment thread shell/plugins/services/idle/Service.qml Resolved
Comment thread shell/plugins/services/idle/Service.qml Resolved
Comment thread shell/plugins/lock/LockView.qml Resolved
Comment thread shell/plugins/services/idle/Service.qml Resolved
Comment thread shell/plugins/services/idle/Service.qml Resolved
After launch settles, pointer, touch, and keyboard dismiss the screensaver, and that dismissal stops the pending lock deadline before the covering windows come down. Idle locking keeps a black surface up until the session lock is secure, then removes the screensaver without requesting another lock. The secure wait gives up after 10 seconds so a lock with no real screen cannot poll forever.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Arash-Afshar
Arash-Afshar force-pushed the fix/screensaver-dismiss-and-lock-handoff branch from fdbd2bd to ad62d54 Compare October 23, 2026 21:37
Comment thread test/shell.d/idle-lock-handoff-test.sh Resolved
The handoff decisions and the secure-wait script now execute in tests, so a dismissal that still races the lock deadline fails the suite.

Co-authored-by: Cursor <cursoragent@cursor.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for working on this. #16800, now merged, replaced the terminal screensaver with a native Wayland overlay that dismisses itself on any key, click, scroll or mouse movement, so this fix to the terminal version is no longer needed. Closing in favour of it.

@omarchybot omarchybot closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants