Restore full-width windows after the idle screensaver - #11277
Open
physikal wants to merge 10 commits into
Open
Conversation
The screensaver used compositor fullscreen mode, which demotes any maximized window underneath. Idle lock then killed the screensaver without restoring that state, so unlock left people tiled. Cover the monitor as a floating overlay instead; session lock remains the security boundary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Idle AFK lock was leaving maximized / full-width windows tiled after unlock, while a manual lock did not. The difference is the idle screensaver: it maps as a real Hyprland client (
org.omarchy.screensaver) in compositor fullscreen, which demotes any full-width window underneath. Lock then kills the screensaver without putting that state back.This PR snapshots non-screensaver fullscreen modes before the screensaver launches and restores them when it exits or when lock kills it. Screensaver visuals stay as they are today.
Why not other approaches
Float/pin overlay instead of compositor fullscreen. Hyprland can raise a floating window over a maximized one without demoting it, so in theory we could cover the monitor without
fullscreen = true. We did not take that path here because it changes how the screensaver covers the screen (bar / reserved areas / focus behavior) and we did not want to trade a layout bug for a visual/UX change in the same PR. Preventing demotion at the window-rule layer is still a reasonable follow-up if someone wants to delete the snapshot helper.Layer-shell / Quickshell overlay (best long-term). The cleanest architecture is for the screensaver not to be a real client window at all — same family as the lock/menu overlays. That never touches tiling. It is not a small refactor of this bug: today's screensaver is a terminal running
ttfx(ASCII branding + random effects), one instance per monitor, with idle tracking keyed on Hyprlandopenwindow/closewindowfororg.omarchy.screensaver, dismiss-on-input, force-start from the menu, and lock'spkillof those terminals. Moving to a layer means reimplementing or embedding that experience and rewiring idle. Worth doing as its own project; out of scope for restoring full-width after idle.Snapshot/restore (this PR). Compensates at the screensaver lifecycle instead of rewriting the screensaver. Small, testable, keeps current visuals, and matches the failure mode (demotion on map, missing restore on exit/lock).
Security
No security change. The screensaver is cosmetic idle UI; authentication remains the Wayland session lock. This only restores layout state the screensaver cleared as a side effect.
Test plan
./test/shell.d/hyprland-fullscreen-snapshot-test.sh./test/shell.d/system-lock-test.shSuper + Alt + F) → force Screensaver from the menu → dismiss — stays full width (verified on a live install of these scripts)