Repository navigation
1.7.2: keep-in-front never steals focus after a click - #18
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed
How
keepFront(takes activation back once if macOS hands it to the previous app ~0.5 s after the.accessory→.regularswitch) used a global mouse monitor that could lose the race againstdidResignActiveNotification, so a click into another app right after a window opened was pulled back (traced: the Bitwarden popup in Edge kept closing).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 (categoryactivation). Same code as PullPing 2d09a4c.Release review: APPROVE.
🤖 Generated with Claude Code