Skip to content

Restore fullscreen windows after the screensaver closes - #10870

Open
WillemCR wants to merge 1 commit into
omacom:quattrofrom
WillemCR:fix/screensaver-restore-fullscreen
Open

Restore fullscreen windows after the screensaver closes#10870
WillemCR wants to merge 1 commit into
omacom:quattrofrom
WillemCR:fix/screensaver-restore-fullscreen

Conversation

@WillemCR

@WillemCR WillemCR commented Sep 8, 2026

Copy link
Copy Markdown

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 -f dismissal cannot kill it.

Fixes #10788.

Validation

  • Regression tests cover two monitors, concurrent launches, fullscreen/maximized/client state, unchanged/closed/reused windows, focus preservation, fading windows, the pkill collision, and transient/persistent query failures.
  • Live checks on Hyprland 0.56.2 with Foot: 2,2, 1,1, and 2,0 each return to their original values after dismissal. The stock launcher reproduces 2,2 → 0,0 → 0,0; this patch gives 2,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_COLOR was unset and PYTHONDONTWRITEBYTECODE=1.
  • Bash syntax and whitespace checks pass. Claude Fable 5.1 reviewed the patch; its reported race is covered by a regression test, and its follow-up found no remaining blockers.

Before / after

Both images show the same window after dismissing the screensaver.

Before After
Original window stays tiled Original window returns to fullscreen

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.

@WillemCR

WillemCR commented Sep 8, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screensaver clears the workspace's fullscreen window and never restores it

1 participant