Restore fullscreen windows after the screensaver closes - #10870
Open
WillemCR wants to merge 1 commit into
Open
Conversation
Author
|
Made as a quick fix by Astra because i was annoyed my youtube window dropped out of fullscreen every few minutes. Probably not the most elegant way to fix it but it seems to work. A screensaver implemented as a desktop overlay could avoid disrupting fullscreen windows altogether, but that’s a larger redesign. |
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.
Fullscreen and maximized windows become tiled when the screensaver takes over their workspace. Save their state before any screensaver maps, then restore it after the last screensaver window closes.
The launcher stays alive on its existing Hyprland event connection and restores surviving windows by address, PID, and stable ID. It preserves independent compositor/client state and the fullscreen handler without changing focus. Concurrent launches share a file lock, unmapped windows do not delay restoration, and a failed compositor query cannot be mistaken for a closed screensaver. The polling process keeps the screensaver class out of its command line so the existing
pkill -fdismissal cannot kill it.Fixes #10788.
Validation
pkillcollision, and transient/persistent query failures.2,2,1,1, and2,0each return to their original values after dismissal. The stock launcher reproduces2,2 → 0,0 → 0,0; this patch gives2,2 → 0,0 → 2,2../test/all: CLI suite passes; 236/237 shell test files pass, with compositor-dependent checks skipped in the sandbox. The sole failure,network-qr-test.sh, also reproduces on an untouched checkout of the same upstream commit. Packaging and ISO companion checkouts were present;NO_COLORwas unset andPYTHONDONTWRITEBYTECODE=1.Before / after
Both images show the same window after dismissing the screensaver.
12-second demonstration and captured window states. Live validation used one monitor and explicit window-close requests; multiple monitors are covered by the automated tests.