Skip to content

fix(screensaver): survive clock calendar popup on launch - #52

Open
kvnloo wants to merge 1 commit into
stagingfrom
factory/tip-13265-screensaver-clock-popup
Open

kvnloo wants to merge 1 commit into
stagingfrom
factory/tip-13265-screensaver-clock-popup

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 25, 2026

Copy link
Copy Markdown
Owner

What

Screensaver launch with an open clock calendar popup (omarchy.clock KeyboardPanel) no longer self-dismisses as a small centered square after ~1.4s.

  1. Dismiss the active bar popout before spawn — omarchy-launch-screensaver calls omarchy-shell -q shell closeActivePopout. New Bar.closeActivePopout() + shell IPC close whichever KeyboardPanel/PopupCard owns the single-popout slot (clock, battery, …), releasing layer-shell focus so the screensaver can become activewindow and Hyprland's fullscreen windowrule for org.omarchy.screensaver can apply.
  2. Focus latch + launch grace in omarchy-screensaver — only treat missing focus as dismissal after the screensaver has actually held focus and a 3s launch grace has elapsed. Never-focused (panel still open) no longer self-kills on the first 1s poll; multi-monitor focus hops during launch also stay inside the grace window.

Why

Trace from omacom#13265: with the calendar open, the screensaver maps at ~800×600 (fullscreen=0), never gets an activewindow event, and omarchy-screensaver exits when screensaver_in_focus is false. Idle then logs screensaver-dismissed and cancels the pending lock. Same root cause as omacom#6917 (open PR omacom#7102's latch alone); closing the panel also addresses the fullscreen half that the latch-only approach left to the compositor.

Tests

  • test/shell.d/launch-screensaver-test.sh — focus-dismiss policy table (panel / grace / multi-monitor hop), static wiring checks, mocked launch verifying closeActivePopout runs before spawn.
  • Gap: end-to-end GUI (Hyprland fullscreen rule + live KeyboardPanel) is not exercised in CI; needs a compositor session.

Issue

Fixes omacom#13265

An open KeyboardPanel (clock calendar via SUPER+CTRL+ALT+D, battery, …)
holds layer-shell keyboard focus. With one up, the screensaver toplevel
never becomes activewindow, Hyprland skips the fullscreen windowrule, and
omarchy-screensaver treats the missing focus as a dismissal ~1s later —
which cancels the idle lock cycle as screensaver-dismissed.

Close the active bar popout before spawning, and only treat lost focus as
a dismissal after the screensaver has held focus and a short launch grace
has elapsed (so multi-monitor focus hops during launch do not self-kill).

Fixes omacom#13265
@kvnloo kvnloo added the keep pr-janitor: never auto-close label Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep pr-janitor: never auto-close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant