Skip to content

Make the screensaver fullscreen when a layer surface holds keyboard focus - #13784

Open
seantimm wants to merge 2 commits into
omacom:quattrofrom
seantimm:screensaver-fullscreen-under-layer
Open

seantimm wants to merge 2 commits into
omacom:quattrofrom
seantimm:screensaver-fullscreen-under-layer

Conversation

@seantimm

@seantimm seantimm commented Sep 29, 2026 •

Copy link
Copy Markdown

Fixes the fullscreen half of #6917 (also reported as #13265 and #8291).

Why

When a layer surface holds keyboard focus (an open bar panel, the Omarchy menu), Hyprland maps the screensaver unfocused and skips its fullscreen window rule. The screensaver shows as a small floating window at the terminal's default size, 700x500 for foot.

The open PRs for #6917 deal with the screensaver quitting after a second (#7102, #12258, #13637, #13475) or with the panel staying on screen (#11239). None of them makes the window fullscreen, and the thread on #6917 treats that part as out of Omarchy's reach. It is reachable: the window rule is skipped, but an explicit fullscreen dispatch for the same window is honoured.

How

default/hypr/apps/system.lua gains a window.open handler next to the screensaver window rules. For a window of class org.omarchy.screensaver it dispatches focus and then fullscreen, both addressed to that window.

Testing

Measured on Hyprland 0.56.2, foot, one 5120x2160 output at scale 2, running bin/omarchy-launch-screensaver force from this branch's base (8b4eae66), no input given. Window state sampled every 250 ms from hyprctl clients -j and hyprctl activewindow -j.

Open at launch quattro This PR
Network panel (omarchy-keyboard-panel) 700x500, fullscreen: 0, never active, gone by 1.5 s 2560x1080, fullscreen: 2, active, still up at 4 s
Omarchy menu (omarchy-menu) 700x500, fullscreen: 0, never active, gone by 1.5 s 2560x1080, fullscreen: 2, never active, gone by 1.5 s
Nothing 2560x1080, fullscreen: 2, active, still up at 4 s same

With the network panel open, a Space keypress injected through ydotool dismissed the screensaver, so keys reach its terminal once it has focus.

test/shell.d/screensaver-fullscreen-test.sh loads system.lua against a stub hl and checks that an opening screensaver gets both dispatches, addressed to itself, and that another window gets none. It passes, as do screensaver-workspace-test.sh, hyprland-default-config-test.sh and hyprland-window-test.sh.

./test/all fails in 11 of 287 test files here, none of them about Hyprland config or the screensaver: config, elsewhen-migration, kernel-headers-migration, launch-browser, network-captive-portal, omarchy-kernel-migration, passwordless-grant-lifecycle, screenshot-sanity, snapper, unowned-system-paths, video-background. I did not rerun the suite on a clean quattro checkout to compare.

Known limits

🤖 Generated with Claude Code

Fixes #13265

Fixes #8291

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A terminal that maps again as it closes lands on special:screensaver, which the class rule keeps out of sight. Focusing it there showed that workspace, and on a monitor with the scratchpad open it took the scratchpad's place and left it hidden after the screensaver was gone. Reproduced on a worker on Hyprland 0.56.2 by mapping a screensaver-class window with the scratchpad showing; with this guard the scratchpad stays.

Co-Authored-By: Codex Medium <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 3, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and run on a disposable Omarchy worker (Hyprland 0.56.2, foot, one 1280x800 output) with Omarchy pointed at this branch.

Reproduced. With the network panel or the calendar popup open, omarchy-launch-screensaver force on quattro maps the screensaver at 700x500, fullscreen: 0, never active, and it is gone within two seconds. With this branch it maps 1280x800, fullscreen: 2, active, and is still up at four seconds. Removing the handler brings the failure back. With the Omarchy menu open it goes fullscreen but still quits, as the description says. The power panel was not on this worker's bar, so that case was not run.

One fix pushed (4c37417): the handler now skips a screensaver that maps on special:screensaver. A terminal sometimes maps again as it closes, and the class rule sends that map to the hidden special:screensaver workspace so it stays out of sight. Focusing it there showed that workspace on the monitor, and if the scratchpad was open, it took the scratchpad's place and the scratchpad stayed hidden after the screensaver closed. That undoes what the special:screensaver silent rule and the shared-scratchpad launch are there for. On the worker, mapping a screensaver-class window while the scratchpad showed reproduced this before the commit and left the scratchpad open after it. The test gains a case for it.

Tests on the worker: screensaver-fullscreen-test.sh (3/3), screensaver-workspace-test.sh, hyprland-default-config-test.sh and hyprland-window-test.sh pass. ./test/cli fails one test, vscode generated theme references current theme file, which fails the same way with this change removed, so it is not from this pull request but does mean the suite is not green.

Second opinion: Codex Medium reviewed it in two rounds. In the first it found the hidden-workspace problem above, which the worker run then confirmed. Its second round, on 4c37417, found nothing open. Codex can read this session's work, so its agreement is not guaranteed to be independent.

Related: this now closes #13265 and #8291, whose calendar case was reproduced and seen fixed. #6917 has the same mechanism but was not run with the power panel, so it is not linked. #13475 also targets #13265 by closing open panels before launch and giving the screensaver a five-second focus grace. Codex judged this pull request the more direct fix for the fullscreen problem. #11239 (closing panels drawn over the screensaver) and the focus-history fixes for the exclusive-focus menu case (#7102, #13637, #12258) address other parts and compose with this one.

Waiting on the maintainer: the change is verified, and the failing ./test/cli test is the only thing between it and ready.

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds window focus and fullscreen logic to screensaver startup.

The PR appears safe to merge based on the reviewed changes.

Summary

The PR adds a screensaver window.open handler that targets the opened window with focus and fullscreen dispatches, while excluding remaps on the hidden fallback workspace. It adds a shell test for those dispatches and exclusions.

Reviews (1) · Last reviewed commit: "Leave a screensaver remapped on its hidd..."

@omarchybot

Copy link
Copy Markdown
Collaborator

This pull request no longer has anything to do on quattro, which is why it now conflicts.

Since it was reviewed, fdbe182 ("Launch the native Wayland screensaver") replaced the terminal screensaver with a native Wayland overlay. bin/omarchy-launch-screensaver now only execs /usr/lib/omarchy-screensaver/omarchy-screensaver, and the org.omarchy.screensaver window rules this handler sat beside were removed from default/hypr/apps/system.lua. On quattro that name appears only in bin/omarchy-debug-idle, as a layer namespace, and a layer surface never emits window.open, so the handler and its test would have nothing to act on if the conflict were resolved. I did not port it.

Checked by reading quattro at 7eedd17 against this head (4c37417); nothing was run, since there is nothing left to run. The second opinion, Codex Medium and muse-wonder via pi (thinking high), was asked whether anything here survives and both found nothing, with the same file and line evidence. Their agreement is not guaranteed to be independent of this review.

What this does not settle: whether #6917 and #13265 still happen with the native overlay while a bar panel holds keyboard focus. The terminal mechanism behind them is gone, but the overlay lives in the omarchy-screensaver package and was not tested in that situation here.

Thanks @seantimm for the careful measurements in this one. Waiting on the maintainer, with the recommendation that it be closed.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screensaver closes after ~1s as a small square when the clock calendar popup is open Screen saver fails to launch if calendar is open

2 participants