Skip to content

Dismiss screensaver on pointer activity after launch settle - #12975

Closed
kvnloo wants to merge 1 commit into
omacom:quattrofrom
kvnloo:fix/12650-idle-screensaver-grace
Closed

kvnloo wants to merge 1 commit into
omacom:quattrofrom
kvnloo:fix/12650-idle-screensaver-grace

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What

Pointer/touchpad motion while the screensaver is up now dismisses it and cancels the pending idle/lock cycle.

Arm a second IdleMonitor only while an org.omarchy.screensaver window is present. It ignores the self-inflicted launch activity until it has settled for 1s, then pkills the screensaver script on the next seat input. The existing closewindow path cancels the idle cycle and stops the lock timer.

Also stop clearing tracked screensaver windows at idle-cycle start so a menu-launched screensaver remains dismissable.

Why

omarchy-screensaver only exits on keyboard stdin or focus loss. The main idle monitor reports active from the launch focus blip and then stays active, so further pointer motion never reaches handleActiveSignal. Touchpad users could not wake the screensaver, and the lock timer could still fire while they were moving the pointer.

Tests

bash test/shell.d/idle-test.sh

Passes: dismiss-state pins in IdleModel.js, QML wiring for dismissMonitor / script pkill, and Stay Awake toggle checks.

Fixes #12650

The main idle monitor stays active after the screensaver launch blip, so
pointer motion never re-signals handleActiveSignal. Arm a short dismiss
monitor while a screensaver window is present: ignore launch activity
until it settles, then pkill the screensaver script on the next seat
input so the existing closewindow path cancels the idle/lock cycle.

Fixes omacom#12650
@llstrk

llstrk commented Sep 23, 2026

Copy link
Copy Markdown

Verified: No actionable defect found in the tested post-settle dismissal path at 71ebdbbcf4087. The idle test passes, and an isolated command-level check matched the dismissal pattern to the real screensaver script rather than the terminal stand-in or launcher decoy. Signalling it ran its cleanup trap and requested cursor restoration.

The source also preserves a menu-launched screensaver's window tracking when an idle cycle starts. The intended flow is:

Tracked screensaver window
  -> one second without input
  -> subsequent pointer input requests script termination
  -> window closure cancels the pending idle/lock cycle

This is a source-supported flow, not an observed desktop sequence. The one-second quiet period is a meaningful boundary: pointer motion starting before it elapses can keep resetting it. Dismissal then needs a pause followed by new input; continuous early motion does not itself cancel the pending lock.


Review information

Test scope: Focused idle test, baseline/control checks and script signalling with synthetic terminal, compositor-command and animation stand-ins. The signal command used a non-login shell. Hyprland/Quickshell upstream source was inspected; installed-version compatibility, real pointer input, terminal behavior and end-to-end lock cancellation were not tested.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra Medium performed initial inspection and synthesis, with independent technical assessments by Opus 5.5 High and GPT 6 Sol Xhigh. Claims were checked against source and targeted evidence.

@sanjyay

sanjyay commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Tested in the Omarchy VM (Omarchy 4.0.4 / Hyprland):

  • Signal delivery verified: Verified that pkill -f 'bash .*bin/omarchy-screensaver$' correctly targets the running screensaver script, triggering its trap exit_screensaver clean shutdown (restoring cursor visibility and terminating ttfx) without prematurely terminating the terminal host.
  • Dismissal logic verified: Verified the 1s settle window on dismissMonitor ignores the initial launch activity burst, then successfully flags subsequent pointer activity to trigger dismissal and cancel the pending lock cycle. Also confirmed menu-launched screensavers retain their tracked window count into the idle cycle.
  • Test suite:
    • bash test/shell.d/idle-test.sh — passed all 14 assertions.
    • ./test/cli — passed all checks.

Works as expected!

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 71ebdbb and verified on an Omarchy VM. This fixes #12650: pointer motion now dismisses the screensaver and cancels the pending lock.

What ran. On a worker built from the Omarchy ISO, running this branch's shell, with the screensaver timeout at 5s and the lock at 45s. A virtual uinput mouse moved the pointer about two seconds after the screensaver came up, with no keyboard input at all:

  • On quattro (d3cfd53) and on this branch with the Service.qml and IdleModel.js changes reverted, the screensaver stayed up and the lock timer stayed armed. With the fix reverted, test/shell.d/idle-test.sh also fails.
  • On this branch, the screensaver closed, the idle cycle was cancelled and the lock timer stopped. The same held on two outputs, for a screensaver launched by hand rather than by idle, and with this branch merged into current quattro, which now opens screensavers on special workspaces. After dismissal the cursor was visible again and no ttfx was left running.
  • Left untouched on two outputs, both screensavers stayed up and the lock fired on time, so the launch itself does not dismiss them.
  • ./test/cli and test/shell.d/idle-test.sh (14 of 14) pass on the worker.

Second opinion. Codex Medium reviewed the same diff and raised two timing points it would want addressed before merging. Both were checked on the worker:

It also judged this the best of the open fixes for this bug, which matches our read. #8048 and #12465 bring back terminal mouse reporting, the approach reverted in d2ea6ad because it missed Bluetooth mice. #11746 uses the same second-IdleMonitor idea but couples it to a rework of the idle-to-lock handoff. The agreement may not be independent.

There is nothing for the author to do. Whether the first-second quirk matters, and which of the competing pull requests to take, is the maintainer's call.

@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

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screensaver doesn't dismiss on pointer/touchpad movement (only keyboard input or focus change)

4 participants