Skip to content

Step the bar below the screensaver while one is up - #13776

Closed
manuaudio wants to merge 12 commits into
omacom:quattrofrom
manuaudio:fix/bar-under-screensaver
Closed

manuaudio wants to merge 12 commits into
omacom:quattrofrom
manuaudio:fix/bar-under-screensaver

Conversation

@manuaudio

@manuaudio manuaudio commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #13700 and #14334.

Since bf44355 moved the screensaver to a special workspace, the top-layer bar can remain above it. Hyprland hides top-layer surfaces behind fullscreen windows on regular workspaces, but not on special workspaces.

I made Bar.qml move from WlrLayer.Top to WlrLayer.Bottom while the idle service reports an open screensaver. The bar stays mapped, so its exclusive zone does not change and regular windows do not reflow. Cloned bars receive the same count through the existing narrow first-party service proxy.

The idle service keeps counting a force-launched screensaver across idle-cycle changes and seeds the count from Hyprland's toplevels when the shell starts. Snapshots only add windows; normal open and close events remain authoritative for removal. Remembering closed addresses prevents a stale clients reply from reviving a closed screensaver.

The focused idle-test.sh restart regression failed before the startup sync and passes on this head. The added race regressions each failed before their corresponding fix. idle-test.sh, bar-test.sh, the JavaScript syntax check, git diff --check, and a clean merge-tree check against current upstream/quattro pass. On a fresh ISO worker, six shell restarts with a screensaver open restored the count to 1 and kept the bar at layer 1; reverting the startup sync restored the failure.

Real-hardware reports cover both sides of the change. A Framework 13 with a 4K external display confirmed that an earlier branch head lowered the bar while the screensaver was open and restored it afterward. A Dell XPS 15 with an ultrawide external display reproduced the pre-fix bar at the top layer over the special-workspace screensaver.

One narrower startup race remains. If the screensaver closes while the shell is restarting, a clients reply sent before the close can leave a ghost count. A probe designed to hit that timing reproduced it in 2 of 20 rounds. The idle service now follows delayed toplevel class metadata, but it cannot observe a close event that occurs while no shell is listening; closing that gap likely requires the larger Quickshell.Wayland.ToplevelManager redesign.

This does not change notification popups, which #9629 covers. #14162 edits the same layer binding, so whichever PR lands second must preserve both conditions.

Fixes #14334

Since the screensaver moved to a special workspace, the bar stays drawn across it: Hyprland hides top-layer surfaces only behind fullscreen windows on regular workspaces. The bar now reads the idle service's screensaver window count and drops to the bottom layer while a screensaver is up, so the fullscreen screensaver covers it; its exclusive zone is unchanged, so no window reflows.

Fixes omacom#13700

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ssandys

ssandys commented Oct 7, 2026 •

Copy link
Copy Markdown

Tested on real hardware: Framework 13 (Ryzen AI 9 HX 370) with a 4K external display (DP-8), omarchy-dev 4.0.0.r6720, Hyprland 0.56.2, foot.

omarchy-launch-screensaver force, reading omarchy-bar's level from hyprctl layers -j:

before screensaver up after close
r6720 2 2 (bar visible over the screensaver) 2
this PR 2 1 (screen fully covered) 2 (bar back)

On the display, the bar is covered while the screensaver is up and draws normally after it closes. #14334 looks like a duplicate of #13700.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Thanks @ssandys. Your Framework 13 and external-display run confirms the layer transition on real hardware and, more importantly, that the screensaver fully covers the bar and the bar returns normally after close. I folded that proof into the PR body.

The bar now steps below the screensaver by the idle service's window count, but starting or cancelling an idle cycle zeroed that count while the windows stayed up. A force-launched screensaver left until the idle timeout put the bar back on top of it, since the launcher refuses to open a second one and nothing counted the first again; turning on Stay Awake over a screensaver did the same. Only the lock closes the windows, so only the lock forgets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed on an Omarchy ISO worker (Hyprland 0.56.2, a virtual display plus a headless second output), with the shell running from this branch, and read by Claude Opus 5.5 and by Codex Medium as a second opinion, over two rounds.

What ran. I read the layer of omarchy-bar from hyprctl layers -j while omarchy-launch-screensaver force was up. On quattro the bar stays at level 2 (top) on both outputs. On this branch it drops to level 1 (bottom) while the screensaver is up and returns to 2 when it closes, on both outputs. The worker could not show the visible symptom itself: in the VM, Hyprland hid the top-layer bar behind the special-workspace screensaver even on quattro. So the proof that the bar is no longer drawn over the screensaver still has to come from real hardware (see below). ./test/cli and the bar, idle, screensaver, indicator and plugin-boundary tests in test/shell.d/ all pass on this branch merged into current quattro.

What I found and fixed (pushed as fa0c9fc). screensaverWindowCount stopped counting a screensaver that was still on screen. startIdleCycle() and cancelIdleCycle() in shell/plugins/services/idle/Service.qml both cleared it. If you force-launch the screensaver and leave it alone, the idle cycle starts at the screensaver timeout, the count drops to 0, and omarchy-launch-screensaver refuses to open a second one. Nothing counts the first one again, so the bar goes back on top of it until the lock fires. With the default timeouts that is from 2½ minutes to 5. Turning on Stay Awake while a screensaver is up did the same thing (Codex found that path). On the worker, with the screensaver timeout set to 20s, the bar went from level 1 back to 2 at the idle-cycle start while both screensavers were still up. Now only lockSystem() clears the count, because it is the only path that also closes the windows. I checked this on the worker for three cases: force-launch followed by idle, force-launch followed by Stay Awake, and an idle-launched screensaver that you dismiss. The first two keep the bar at level 1 until the screensaver closes. The third still cancels the idle cycle and its pending lock. test/shell.d/idle-test.sh gains an assertion that fails without the change. Codex's second round found nothing further.

Not addressed. The count is built only from openwindow/closewindow events. If the shell restarts while a screensaver is up, the bar sits above that screensaver until it closes.

Overlap. #14162 (bar below fullscreen windows) edits the same WlrLayershell.layer line. Whichever lands second needs both conditions in that one binding.

Waiting on the reporter. @ssandys, you opened #13700 and tested an earlier head of this branch. The head has moved, so could you confirm on the same Framework and external display that the screensaver still fully covers the bar and that the bar comes back after it closes, at fa0c9fcf8235ef4e463e66ee04c4e5dc75da3f98?

git clone https://github.com/manuaudio/omarchy.git ~/omarchy-13776
git -C ~/omarchy-13776 checkout fa0c9fcf8235ef4e463e66ee04c4e5dc75da3f98
omarchy dev link ~/omarchy-13776   # reboot when asked; `omarchy dev unlink` restores the package install

If it's convenient, also try omarchy-launch-screensaver force and leave it untouched past your screensaver timeout. The bar should stay covered.

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge; no new blocking issue was found.

Summary

The bar moves below an open screensaver without unmapping or changing its reserved space.

  • The bar moves below the screensaver while it is open.
  • The idle service keeps screensaver counts in step with Hyprland.

All three previous, unnumbered findings are addressed: cloned bars receive the count, startup reads existing windows, and the source-text assertions were removed. manuaudio explicitly deferred the narrow stale-reply startup race and delayed-class case because a small fix was not available.

Reviews (10) · Last reviewed commit: "Normalize screensaver window addresses" · Reviewed by Greptile

Comment thread shell/plugins/bar/Bar.qml Resolved
The bar steps below the screensaver by the idle service's screensaver window count, but a cloned bar is not first-party and reaches that service through the narrow proxy, which had no such property. The comparison read undefined, so after `omarchy plugin clone omarchy.bar` the bar stayed drawn over the screensaver. The proxy now carries the count, bound to the live service like its other read-only state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed after Greptile's comment on the cloned bar. Claude Opus 5.5 reviewed it, Codex Medium gave a second opinion, and the tests ran on an Omarchy ISO worker (Hyprland 0.56.2) with the shell running from this branch.

Greptile's finding holds, and is fixed in 3efd4f6. A bar made with omarchy-plugin-clone omarchy.bar is a third-party plugin, so pluginShellFor hands it the scoped shell. Its firstPartyServiceFor("omarchy.idle") then returns the narrow proxy in shell/services/PluginFirstPartyServiceApi.qml, which had no screensaverWindowCount, so screensaverShown was always false and a cloned bar stayed on top of the screensaver. The proxy now carries the count, bound to the live idle service the same way as stayAwake. It is a single number: no window addresses, and no access to the service object.

What ran. On the worker I cloned the bar and read omarchy-bar's layer from hyprctl layers -j around omarchy-launch-screensaver force. At fa0c9fc the cloned bar stayed at level 2 (top) while the screensaver was up. At 3efd4f6 it went from 2 to 1 and back to 2 after the screensaver closed, the same as the built-in bar. test/shell.d/runtime-smoke-test.sh gains a probe that a replacement bar's idle proxy exposes the count; it fails at fa0c9fc and passes at 3efd4f6. With the branch merged into current quattro, ./test/cli and the bar, idle, indicator, plugin, plugin-clone, plugin-boundary, runtime-smoke, screensaver-workspace and installed-service tests in test/shell.d/ all pass. On the branch alone, one VS Code theme test in ./test/cli fails because of the branch's older base; it passes on quattro and on the merge.

Second opinion. Codex Medium traced the same path and agreed with the finding and the fix. It wrote its answer after mine, so its agreement is not guaranteed to be independent. It found nothing new: the one gap it raised is the limitation already noted here, that the count is rebuilt only from window events, so if the idle service restarts while a screensaver is up, the bar sits above that screensaver until it closes.

Overlap. #14162 is still open and edits the same WlrLayershell.layer line. Whichever lands second needs both conditions in that one binding.

Waiting on the reporter. @ssandys, the head has moved again. When you have a moment, could you repeat your Framework and external-display check at 3efd4f6a2f2800b66622d4c361f5f8cc9f6b4ad4? Use the same steps as before, checking out that SHA instead.

git -C ~/omarchy-13776 fetch origin && git -C ~/omarchy-13776 checkout 3efd4f6a2f2800b66622d4c361f5f8cc9f6b4ad4
omarchy dev link ~/omarchy-13776   # reboot when asked; `omarchy dev unlink` restores the package install

If you don't have that clone yet, start with git clone https://github.com/manuaudio/omarchy.git ~/omarchy-13776.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 7, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Verified at 3efd4f6, merged into current quattro (902fd8a), on a fresh Omarchy ISO worker (Hyprland 0.56.2) with the shell running from that tree. Claude Opus 5.5 reviewed it, and Codex Medium gave a second opinion on the merged tree.

What ran. Reading omarchy-bar's layer from hyprctl layers -j around omarchy-launch-screensaver force: on quattro the bar stays at level 2 (top) with the screensaver up; with this branch it goes from 2 to 1 and back to 2 after the screensaver closes, and the same for a bar cloned with omarchy plugin clone omarchy.bar; with only the WlrLayershell.layer line reverted it stays at 2 again. ./test/cli and the bar, idle, runtime-smoke, screensaver-workspace, indicator, installed-service, plugin, plugin-clone and plugin-boundary tests in test/shell.d/ all pass on the merged tree.

Second opinion. Codex Medium checked that quattro's newer idle code (timers that can be disabled, and the cancellation when both timeouts are zero) still keeps the screensaver count accurate, and that no path leaves the bar on the bottom layer after the screensaver is gone. It found nothing blocking. It agreed the one limitation already noted here, that a shell restart while a screensaver is up leaves the bar on top of it until it closes, is the pre-change behaviour for that case rather than a regression; seeding the count from existing windows would be a follow-up. Its agreement is not guaranteed to be independent.

Next. This is reproduced on a worker, so it no longer waits on a hardware retest; @ssandys, a run at 3efd4f6 is still welcome but not needed. It is waiting on the maintainer. #14162 still edits the same WlrLayershell.layer line, so whichever lands second needs both conditions in that binding.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 11, 2026
quattro now checks that the IPC toggle cycles the bar background; keep that assertion beside this branch's screensaver one.

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 11, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This stopped merging cleanly after quattro moved, so I merged current quattro (1ac31e5) into the branch as 8c99515. The only conflict was in test/shell.d/bar-test.sh: quattro now asserts that the IPC toggle calls shell.bar.cycleBackground(). The merge keeps that assertion next to this branch's screensaver assertion. No other file needed a hand edit, and the fix itself is unchanged.

What ran. On a fresh Omarchy ISO worker, with the shell linked to each tree, I read omarchy-bar's layer from hyprctl layers -j around omarchy-launch-screensaver force. On quattro the bar stays at level 2 while the screensaver is up. On 8c99515 it drops from 2 to 1 and returns to 2 after the screensaver closes, and a bar cloned with omarchy plugin clone omarchy.bar does the same. With only the WlrLayershell.layer line reverted, it stays at 2. On 8c99515, ./test/cli passes, and so do the bar, idle, screensaver-workspace, plugin-clone, plugins, plugin-auth-boundary, plugin-registry-contract, indicator-contract and installed-service tests in test/shell.d/. runtime-smoke-test.sh fails one assertion, "bar put places a widget after the one it names", and it fails the same way on plain quattro, so this branch did not cause it.

Review. Claude Opus 5.5 reviewed the merge, including what quattro changed in the bar and idle service since the last verification (the glassy background and the qualified Commons.Color references). Nothing else sets the bar's layer or resets the screensaver count. Codex Medium did not give a second opinion on this head: the reviewer answered, but omabot's daily review budget was spent. The earlier Codex review covered 3efd4f6 against an older quattro.

Next. The branch is verified again at 8c99515. Before it can be marked ready, it needs a second opinion on this head. After that it waits on the maintainer. #14162 is still open and changes the same WlrLayershell.layer line, so whichever lands second needs both conditions in that binding.

Comment thread shell/plugins/bar/Bar.qml Resolved
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 11, 2026
omarchybot and others added 3 commits October 12, 2026 00:12
Quickshell inserts a new toplevel before Hyprland reports its class, so a model change in that gap listed a screensaver the openwindow event had already counted as not a screensaver, and the sync closed it. The count dropped to zero with the screensaver still up, putting the bar back on top of it and, during an idle cycle, cancelling the pending lock as if the screensaver had been dismissed. Sync now only adds windows it can classify; closing stays with closewindow events, which name the window that actually closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
Quickshell rebuilds its toplevels from a clients reply at startup and on a config reload, and a reply sent just before a screensaver closes can arrive after its closewindow event, recreating the window in the model. The sync then counted a screensaver that no longer existed, and with no further close event coming the bar stayed on the bottom layer, and the next dismissed screensaver could leave the lock timer armed. The service now remembers screensavers closewindow closed and the sync skips them, until Hyprland opens a window at that address again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
The lock resets the screensaver count and then closes the screensavers, so their closewindow events found nothing counted and left no mark, and a clients reply sent before the close could still revive one as a ghost count, leaving the bar below the layer after unlock. Marking every closewindow address covers it; the map holds one address per window closed in the shell's lifetime and drops it when Hyprland opens a window there again.

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

Copy link
Copy Markdown
Collaborator

Re-reviewed after 904cbf3, which seeds the screensaver count from Hyprland's toplevels so a shell restart no longer puts the bar back on top of an open screensaver. Claude Opus 5.5 reviewed it and Codex Medium gave a second opinion over four rounds. Everything ran on a fresh Omarchy ISO worker (Quickshell 0.3.1) with the shell linked to this branch merged into current quattro (9480d1b).

The restart fix works. With a screensaver up, six omarchy-restart-shell runs in a row all brought the count back to 1 and kept omarchy-bar at layer 1. With 904cbf3 reverted, the same restart gives count 0 and the bar at layer 2, on top of the screensaver. On plain quattro, the bar stays at layer 2 whenever the screensaver is up.

The new sync could lose or invent a count, so I pushed three fixes to your branch:

  • b880e6b. Quickshell adds a new toplevel before Hyprland reports its class. If any other window changed in that gap, the sync took a screensaver the openwindow event had already counted for a non-screensaver and closed it. The count dropped to 0 with the screensaver still up, the bar went back on top, and during an idle cycle the pending lock was cancelled as if the screensaver had been dismissed. Opening a screensaver-class window and another window back to back lost the count in 5 of 15 rounds at 904cbf3, and in none after the fix. The sync now only adds windows; closing stays with closewindow, as before.
  • 16014b5. A clients reply that Quickshell requested just before a screensaver closed (at startup, or on hyprctl reload) can arrive after the close and recreate the window. The sync then counted a screensaver that no longer existed, and the bar stayed on the bottom layer with nothing over it. Reloading while closing one left that ghost count in 2 of 20 rounds, and in none of 25 after the fix. The service now remembers closed windows and the sync skips them until Hyprland opens a window at that address again.
  • b2a14db. The lock resets the count before it closes the screensavers, so those closes were not remembered. Now every close is. Codex found the cause in Quickshell's source and found no defect in the fix.

idle-test.sh gains an assertion for each fix, and each fails on the code before its fix. ./test/cli passes, and so do the idle, bar, screensaver-workspace, plugin-clone, indicator-contract and installed-service tests in test/shell.d/. runtime-smoke-test.sh fails one assertion, "bar put places a widget after the one it names", and it fails the same way on plain quattro.

Still open. If the screensaver closes in the moment the shell is restarting, a ghost count can remain: 2 of 20 rounds in a probe built to hit that moment. My reading, which Codex shares from Quickshell's source: the close lands before the new shell is listening for events, while its first clients reply, sent before the close, still lists the window. The bar then stays on the bottom layer until the next shell restart. Codex also points out a second gap it found in the source but I did not reproduce: if a window's class arrives without the toplevel list changing, the startup sync never sees it. Neither has a small fix. Codex's suggestion is to track screensavers through Quickshell.Wayland.ToplevelManager instead of Hyprland's snapshots, which is a redesign of the counting rather than a patch.

Next. This waits on the maintainer: accept the restart fix with that rarer startup case noted, or ask for the ToplevelManager approach first. #14162 still edits the same WlrLayershell.layer line, so whichever lands second needs both conditions in that binding.

@tuthan

tuthan commented Oct 21, 2026

Copy link
Copy Markdown

Another real-hardware reproduction of #13700 / #14334, from before this PR: Dell XPS 15 9510 (Intel iGPU), Omarchy 4.5.0rc1-1, Hyprland 0.56.2, foot, one 3440x1440 DP external as the only active output (laptop panel disabled).

omarchy-launch-screensaver force, then hyprctl clients -j and a grim -o DP-1 capture:

  • The screensaver window is special:screensaver-DP-1, fullscreen=2, floating, at 0,0 and 3440x1440.
  • hyprctl layers still lists omarchy-bar at level 2 (top), and the capture shows the bar drawn over the screensaver.

One extra data point: it is intermittent here. In a second run with nothing changed, the capture showed no bar. That fits the "Hyprland hides top-layer surfaces behind fullscreen windows on regular workspaces, but not on special workspaces" explanation, and it may be why the VM run above could not reproduce the visible symptom.

I have not tested this PR's branch. As a local workaround I hide the bar via the bar-off toggle while an org.omarchy.screensaver window exists. That worked on two consecutive runs, which supports hiding or lowering the bar as the right approach.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Thanks @tuthan. Your Dell and ultrawide reproduction adds a second real-hardware case and confirms the pre-fix state: the screensaver is on its special workspace while omarchy-bar remains at the top layer. The intermittent visibility also explains why the layer transition is the more reliable check than a screenshot alone. Your bar-off workaround supports the same stacking diagnosis; this PR keeps the bar mapped and lowers it instead, so windows do not reflow. I’ve recorded this as supporting evidence. A branch retest is welcome if convenient, but the existing Framework test already covers the fix on hardware.

@manuaudio

Copy link
Copy Markdown
Contributor Author

I merged current quattro into this branch as 57615698d. The conflicts were limited to bar-test.sh and runtime-smoke-test.sh; the resolutions keep the current upstream coverage and this PR's screensaver and replacement-bar checks.

A fresh Codex review then found one remaining startup gap: Hyprland can add a toplevel before filling lastIpcObject.class, without changing model membership again. I fixed that in 7fbc40a53 by making the idle service react to the nested IPC metadata as well as list changes.

The new regression failed before 7fbc40a53 with idle refreshes the screensaver count when Hyprland fills in a toplevel class, then passed afterward. bar-test.sh, idle-test.sh, Bash syntax checks, git diff --check, and a focused runtime smoke run through the replacement-bar service boundary all pass. The unmodified full runtime smoke test still does not complete locally: this head stops at the transparent-bar sampling assertion, while current quattro also fails later at the existing per-screen IPC-handler count. A final Codex review found no actionable correctness defects.

Comment thread test/shell.d/idle-test.sh Resolved
@manuaudio

Copy link
Copy Markdown
Contributor Author

The final review caught a second startup bug: Hyprland snapshots use 0x-prefixed addresses while raw window events use unprefixed hexadecimal addresses. In f0f5c1768 I normalize both paths before updating the screensaver and closed-window maps. The focused regression first restored 0xAbC and failed to remove it with close event ABC; it passes after the fix. idle-test.sh, the focused replacement-bar runtime smoke path, JavaScript and Bash syntax checks, and git diff --check pass. I also updated the PR body so the delayed-class case is no longer listed as an open limitation.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 28, 2026
@manuaudio

Copy link
Copy Markdown
Contributor Author

Current quattro merged #16800 as ce0ef48a8. That replaces the terminal windows on special workspaces with native omarchy-screensaver layer surfaces created at Layer::Overlay on every output, so the stacking bug reported in #13700 and #14334 no longer reaches the bar code. It also removes the idle service screensaver-window tracking that this branch extends.

Rebasing this branch would restore obsolete tracking and conflict with the new design. I am closing it as superseded by #16800 rather than carrying a second fix. The hardware reproduction and race regressions remain useful history, but nothing from this branch should land on current quattro.

@manuaudio manuaudio closed this Oct 28, 2026
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

4 participants