Skip to content

Keep the screensaver up while launch hops between monitors - #8142

Closed
chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:fix/screensaver-multimonitor-focus
Closed

chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:fix/screensaver-multimonitor-focus

Conversation

@chessing234

@chessing234 chessing234 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

omarchy-launch-screensaver focuses each monitor in turn while spawning. hyprctl activewindow is global, so on 3+ monitors the first screensaver's 1s poll could see another output's client (or no class) and exit_screensaver, which pkills every org.omarchy.screensaver instance. The idle manager treated that as a user dismiss and cancelled lock/DPMS.

screensaver_in_focus now stays up when the focused window is another screensaver or has no class (monitor switch). It dismisses only when a real non-screensaver client is focused. Real dismiss still kills all instances.

screensaver-test.sh covers screensaver class, empty class, and a foreign client.

Fixes #8114

activewindow is global, so a 3+ monitor launch focusing the next
output made the first screensaver see a non-screensaver (or empty)
client and kill every instance. Dismiss only when a real
non-screensaver window is focused.

Fixes omacom#8114
Copilot AI balanced review requested due to automatic review settings August 25, 2026 03:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Attempts to prevent multi-monitor screensavers from terminating during monitor focus transitions.

Changes:

  • Treats missing or screensaver window classes as focused.
  • Adds focused-window behavior tests.
  • A foreign window during launch can still trigger the original race.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-screensaver Adjusts focus detection and adds a test hook.
test/shell.d/screensaver-test.sh Tests screensaver, missing, and foreign classes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chessing234

Copy link
Copy Markdown
Contributor Author

@dhh @ryanrhughes ready for review

chessing234 added a commit to chessing234/omarchy that referenced this pull request Sep 21, 2026
@chessing234

Copy link
Copy Markdown
Contributor Author

folded into #12730 with the other screensaver/presentation toggles.

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.

[Quattro] omarchy-launch-screensaver creates focus-check race condition on 3+ monitor setups causing immediate self-termination

2 participants