Skip to content

1.7.2: keep-in-front never steals focus after a click - #18

Merged
roypadina merged 1 commit into
mainfrom
fix/keepfront-input-check
Nov 15, 2026
Merged

roypadina merged 1 commit into
mainfrom
fix/keepfront-input-check

Conversation

@roypadina

Copy link
Copy Markdown
Owner

Fixed

  • No longer takes focus back from another app you clicked into right after opening a window.

How

  • keepFront (takes activation back once if macOS hands it to the previous app ~0.5 s after the .accessory → .regular switch) used a global mouse monitor that could lose the race against didResignActiveNotification, so a click into another app right after a window opened was pulled back (traced: the Bitwarden popup in Edge kept closing).
  • It now asks the window server for the last mouse-down / keyDown when activation goes (CGEventSource.secondsSinceLastEventType(.hidSystemState, …)): any input since the show means no retake. The 1.5 s limit is checked inside the handler, and every retake is logged (category activation). Same code as PullPing 2d09a4c.
  • Version 1.7.2, CHANGELOG.

Release review: APPROVE.

🤖 Generated with Claude Code

…1.7.2)

The keepFront guard watched clicks with a global event monitor, but
didResignActiveNotification can arrive before the monitor sees the click
that caused it, so a click into another app right after a window opened was
pulled back (traced with PullPing, Bitwarden popup in Edge closing). Now,
when activation goes, it asks the window server for the last mouse-down /
keyDown: any input since the show means no retake. The 1.5 s limit is
checked inside the handler, and every retake is logged (category
"activation"). Same code as PullPing 2d09a4c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roypadina
roypadina merged commit 18e3586 into main Nov 15, 2026
1 check passed
@roypadina
roypadina deleted the fix/keepfront-input-check branch November 15, 2026 20:18
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.

1 participant