Repository navigation
Dismiss active screensaver when opening application launcher (#16258) - #16420
hari45wavin wants to merge 2 commits into
Conversation
[Medium impact] The change affects screensaver dismissal across desktop shell interactions. The PR still needs a fix for screensaver launches that can finish after dismissal. FindingsSummaryThis PR dismisses the screensaver when the user opens the launcher or another shell surface.
|
| Util.execArgv(["pkill", "-f", "[o]rg.omarchy.screensaver"]) | ||
| root.cancelIdleCycle("screensaver-dismissed") |
There was a problem hiding this comment.
Screensaver returns after dismissal
If the user opens the launcher while omarchy-launch-screensaver is still starting terminals, pkill only kills terminals that already exist. The launch helper does not match that pattern and can start another terminal afterward. cancelIdleCycle() stops timers but leaves the helper running, so a screensaver window can appear after dismissal. Cancel pending launches as well as existing screensaver windows.
| assert( | ||
| /function dismissScreensaver\(/.test(serviceSource) && | ||
| /pkill[\s\S]*?screensaver/.test(serviceSource) && | ||
| /cancelIdleCycle\("screensaver-dismissed"\)/.test(serviceSource), | ||
| 'idle service dismisses screensaver and cancels idle cycle' | ||
| ) |
There was a problem hiding this comment.
These new tests only search for implementation text. AGENTS.md explicitly says, “Don't restate the implementation: grepping the source or config for the string you just added.” They never call dismissal or check that the screensaver stops. The summon expression also passes when an earlier return skips dismissal.
Replace these checks with a test that exercises the real dismissal path and checks its effects. This repository requirement must be satisfied before merging.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
I read this against
Two other open pull requests fix the same bug in different ways. #11746 dismisses the screensaver on any seat input the compositor sees. #16235 makes the terminal report modifier keys. #11746 is the oldest. Under our default, the first fix to arrive keeps the credit unless a later one is clearly better, and the defects above mean this one is not. Codex reached the same conclusion on its own, though its independence from my reasoning is not guaranteed. One case this approach does handle that #11746 does not: a press during #11746's settle window just after the screensaver launches. That only counts if dismissal also stops the launch in progress. This now waits on the maintainer, who decides which approach to take for #16258. I have not labelled it beyond |
…summon early return (omacom#16258)
|
Thanks for the thorough review! Updated with the following improvements:
|
|
I read 2ff0b23 against
The new On the competing fixes, nothing has changed: #11746 is the oldest, and neither Codex nor I found a defect in how it handles this reproduction that would make this one clearly better. The one case this one handles that #11746 does not, a press in the moments right after the screensaver starts, needs the launch to be stopped, and stopping it this way costs the focus handoff. This waits on the maintainer to choose an approach for #16258. It stays labelled |
Fixes #16258
Problem
When the screensaver is running on its special workspace and a user presses
Super+Space(or any shortcut that summons the application launcher or menu), the global shortcut is consumed by Hyprland and triggers the Quickshell overlay menu. Because Quickshell menus and panels are Wayland layer-shell surfaces rather than regular client windows, Hyprland'sactivewindowdoes not change to another regular window. The screensaver process (bin/omarchy-screensaver) therefore continues running in the background behind the launcher overlay, rather than dismissing upon user interaction.Solution
shell/plugins/services/idle/Service.qml): AddeddismissScreensaver(reason)method that checks if the screensaver is active/running, sends SIGTERM (pkill -f [o]rg.omarchy.screensaver), and cancels the idle cycle (cancelIdleCycle("screensaver-dismissed")). Exposed this onShellIpc.shell/shell.qml): Addedshell.dismissScreensaver()which invokes the idle service method (or falls back to pkill), and called it insummon()andrunShortcut()whenever an interactive overlay or shortcut is activated.bin/omarchy-menu): Explicitly issuespkill -f '[o]rg.omarchy.screensaver'before invokingtoggleorsummoncommands to ensure screensaver termination even if summoned directly via CLI.test/shell.d/idle-test.shverifying screensaver dismissal logic inService.qmlandshell.qml.