Repository navigation
Close screensaver on mouse move/click. - #16549
erykwieliczko wants to merge 1 commit into
Conversation
Keep window tracking across idle cycles so manually started screensavers remain dismissible. Signed-off-by: Eryk Wieliczko <eryk@wieliczko.ninja>
[Medium impact] The change reaches the desktop idle and screensaver workflow. The PR appears safe to merge, with a non-blocking gap in tests for input dismissal. Findings
SummaryAdds mouse-triggered screensaver dismissal through compositor input events.
|
| [[ -f $tmpdir/input-ready ]] || fail "input dismissal arms after both screensavers map and focus returns" "$(<"$tmpdir/calls")" | ||
| pass "input dismissal arms after both screensavers map and focus returns" |
There was a problem hiding this comment.
Input dismissal remains untested
The new assertion checks that the launcher sends screensaverReady, but never runs the dismissal code in Service.qml. It would still pass if the arm timer or input handler stopped working. Add a focused test for input before and after arming, dismissal during continuous input, and disarming when the last window closes.
|
Reviewed at c030763. It does what it says, with one gap: a screensaver window that maps late is never armed. I tried to push the fix to this branch, but GitHub refused it (403 for the maintainer-edit push), so it is below for you to apply. What was run. All of this ran on a disposable worker built from the Omarchy ISO, with this branch linked as the running shell (foot, one monitor), driving a real pointer and keyboard through uinput:
The gap. function handleScreensaverWindowOpened(address) {
setScreensaverWindow(address, true)
screensaverLaunchGraceTimer.stop()
+ // A terminal that maps after the launcher stopped waiting missed its screensaverReady.
+ if (!root.screensaverInputReady) screensaverInputArmTimer.restart()
}During a normal launch this changes nothing: the launcher's Second opinion. Codex Medium and muse-spark-1.3-contributor High reviewed the diff. Both raised the late-map gap and traced how it happens. I had asked them about that case, so their agreement is not independent confirmation. The other points they raised, each checked:
Related. This addresses #7762. It probably fixes #15985 too: a letter key now dismisses through the compositor, though I did not reproduce that issue's ttfx condition. It does not touch #13157. #7528, #12975, #11746, #16235 and #16519 compete with it; which one lands is the maintainer's call. Waiting on. @erykwieliczko, to apply the change above (or let the bot push to the branch). After that it goes to the maintainer. |
|
Cross-reference: #16519 is an earlier two-line fix for the same click case. It turns on button-press reporting inside the screensaver script, so a click reaches the script's existing input read. It works in every terminal the launcher supports and needs no shell changes. This PR solves it at the compositor level instead, which also covers mouse motion and keeps the idle service in charge of the screensaver lifecycle. Both fix the reported bug; they overlap, and one is enough. If this one is preferred, #16519 can close. |
|
Thanks @erykwieliczko. The bot couldn't push to this branch (GitHub refused the maintainer-edit push), so the work has moved to a branch on this repository. Your commit goes across unchanged, and the late-window fix from the review above sits on top of it. It is open as a new pull request that credits you, and review continues there. Continued in #16790. |
Arm 500ms after the launcher finishes, with a 1ms inactivity threshold that catches continuous input. Keep manual screensavers tracked across idle cycles.
Tested in Foot: idle/menu launches, startup input, lock cancellation, cursor/process cleanup, two outputs (second headless), and an ESP32-S3 BLE HID mouse.
Related: #7528, #12975, #11746.