Skip to content

Show the cursor again when the screensaver dies without its exit (4.5) - #19117

Open
abhirupghosh wants to merge 2 commits into
omacom:v4-5-0from
abhirupghosh:screensaver-cursor-safety-net-4.5
Open

abhirupghosh wants to merge 2 commits into
omacom:v4-5-0from
abhirupghosh:screensaver-cursor-safety-net-4.5

Conversation

@abhirupghosh

Copy link
Copy Markdown

On 4.5 the terminal screensaver hides the cursor and only shows it again from its own exit path. A screensaver terminal that dies without running that path leaves the desktop with no cursor (cursor:invisible stays true) until it is reset by hand. Quattro's native screensaver handles this in omarchy-system-lock, but 4.5 still ships the terminal one.

  • Cursor safety net. The idle service already watches Hyprland's window events. It now tracks every screensaver window on its own, separately from the idle cycle's count, which lock and cancel clear before the windows have actually closed. When the last one closes, it shows the cursor again. Both this and the screensaver's own exit leave the cursor alone while the startup reveal is still pending (omarchy_startup_cursor_pending).
  • Narrower screensaver matching. pgrep -f '[o]rg.omarchy.screensaver' matched any command line mentioning the class. Any process with the class in its arguments made the launcher think a screensaver was already running (it exited silently), and the exit and lock paths could kill that process. The launcher, the screensaver exit, omarchy-system-lock and omarchy-debug-idle now match only the alacritty/ghostty/foot/kitty process started with --class=/--app-id=org.omarchy.screensaver.

Tested on a live 4.5 session (foot): SIGKILLing the screensaver script and its terminal, so its exit never runs, now brings the cursor back, and the shell logs cursor-show: last screensaver window closed. With a startup reveal pending, the cursor stays hidden. A shell command containing the match pattern is no longer matched. ./test/all passes.

🤖 Generated with Claude Code

abhirupghosh and others added 2 commits November 16, 2026 18:14
The screensaver hides the cursor and only shows it again from its own exit
path, so a terminal that dies without running it leaves the desktop with no
cursor. The idle service now tracks every screensaver window and shows the
cursor once the last one closes. Both paths leave the cursor alone while the
startup reveal is still pending.

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

`pgrep -f '[o]rg.omarchy.screensaver'` matched any command line mentioning the
class, so an unrelated process could make the launcher think a screensaver was
already running, and the exit and lock paths could kill it. Match the terminal
launched with the screensaver class instead.

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

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect the desktop idle, screensaver, and lock workflow.

Fix cursor recovery for screensaver windows that survive a shell restart before merging.

Findings

  1. P1 Restart leaves screensavers untracked ▶

Summary

Adds cursor recovery when the last tracked screensaver window closes.

  • The desktop shows its cursor after the last screensaver window closes.
  • Screensaver checks now identify only the supported terminal process.

abhirupghosh explicitly describes preserving startup ownership while omarchy_startup_cursor_pending is true as intentional.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Screensaver window opens] --> B[Track window separately]
  B --> C[Window closes]
  C --> D{Last tracked window?}
  D -->|Yes| E{Startup reveal pending?}
  E -->|No| F[Show cursor]
  E -->|Yes| G[Leave cursor unchanged]
Loading

Reviews (1) · Last reviewed commit: "Match only the screensaver terminal when..." · Reviewed by Greptile

} else if (name === "closewindow") {
var close = eventParts(event, 1)
var address = String(close[0] || "")
if (root.cursorHidingWindows[address]) root.trackCursorHidingWindow(address, false)

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.

P1 Restart leaves screensavers untracked

After a shell restart or crash recovery, cursorHidingWindows starts empty even if screensaver windows are still open. This check then ignores those windows when they close. If their terminal dies without running exit_screensaver, the cursor stays hidden. Seed the map from existing screensaver windows when the service starts, alongside watching new events.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I reproduced the abrupt-death case on a disposable Omarchy worker using foot: killing the screensaver script and its terminal left cursor:invisible=true on the base, restored it to false at 784af9bd1add57713a2a00ddb9160fce085567e4, and left it true again with the fix reverted. The startup-pending guard also kept the cursor hidden as intended. CLI (129 checks), idle (17), system-lock (1), and screensaver-workspace (6) tests passed; the full shell suite was not run.

Greptile's restart limitation also reproduces: launch the screensaver, run omarchy-restart-shell, then kill the script and terminal; the cursor stays hidden with no screensaver windows left. Service.qml:190 ignores the close because the new shell starts with an empty map. This is an uncovered existing failure, rather than a new regression.

Codex High reviewed and ran the worker checks; Opus 5.5 High and muse-wonder via pi, thinking high reviewed the code. Both reviewers agree that release scope needs a maintainer decision; independence is not guaranteed. The terminal implementation was replaced on v4-5-1 by #19068 and is also gone from quattro. Nothing was pushed. The queue refused the ready label because this targets v4-5-0 rather than quattro; it only permits automatic retargeting from dev. This is waiting on the maintainer to decide whether v4-5-0 still needs terminal-screensaver maintenance before addressing the remaining case.

These worker captures show the compositor's reported cursor state after all screensaver windows closed; they do not photograph the pointer itself.

Base: invisible=true after abrupt screensaver death

Head: invisible=false after abrupt screensaver death

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

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants