Skip to content

Fix focus follows mouse over transient overlays - #2245

Open
Miyou wants to merge 1 commit into
nikitabobko:mainfrom
Miyou:fix/focus-follows-mouse-transient-windows
Open

Fix focus follows mouse over transient overlays#2245
Miyou wants to merge 1 commit into
nikitabobko:mainfrom
Miyou:fix/focus-follows-mouse-transient-windows

Conversation

@Miyou

@Miyou Miyou commented Aug 27, 2026

Copy link
Copy Markdown

Addresses #2177 while preserving the floating-window priority described in #2151.

PR checklist

  • Explain your changes in the relevant commit messages rather than in the PR description. The PR description must not contain more information than the commit messages (except for images and other media).
  • Each commit must explain what/why/how and motivation in its description. https://cbea.ms/git-commit/
  • Link the appropriate issues/discussions in commit messages (if applicable).
  • Each commit must be an atomic change (a PR may contain several commits). Do not introduce new functional changes together with refactorings in the same commit.
  • ./test.sh exits with zero exit code.
  • Avoid merge commits; always rebase and force push.

@github-actions github-actions Bot added the not-actionable By default, all PRs have this label. If the PR makes sense, the label will be removed. label Aug 27, 2026
vitorebatista added a commit to vitorebatista/AeroSpace-edge that referenced this pull request Aug 27, 2026
…te sync state

Sync state moves to upstream main @ c548c7f / 59 open PRs, reviewed 2026-08-27.
Adds the newly ported upstream PRs (2244, 2232, 2211, 2228, 2225) to the
already-backported list, and records this cycle's skips: focus-follows-mouse PRs
(nikitabobko#2238/nikitabobko#2245, feature absent in the fork), nikitabobko#2220 (duplicate of the already-ported
nikitabobko#2024), nikitabobko#2213 (deletes lastNativeFocusedWindowId, which fork PR #59 depends on),
nikitabobko#2206 (competing implementation of nikitabobko#2225), and six deferred feature PRs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBcwRe3CktWZGGcHJHP4ds
Focus-follows-mouse currently uses Accessibility only to check whether any window exists under the pointer, then chooses a managed window by AeroSpace workspace geometry. When an unmanaged transient window overlays a managed window, the geometry lookup falls through to the managed window, focuses it, and dismisses the transient window. This reproduces with the Choosy browser picker and matches nikitabobko#2177.

Resolve the AX element under the pointer to its containing CGWindowID and continue only when that exact ID belongs to a managed window on the active workspace. Once the exact hit establishes that the topmost window is managed and tiled, preserve the existing MRU floating-window preference described in nikitabobko#2151. This lets hidden floating Settings windows surface on hover without allowing Choosy or another unmanaged overlay to fall through. Keep the exact hit for floating, fullscreen, and other non-tiling managed windows.

Restore the internal mruChildren accessor for the narrowed floating-window scan. Add regression tests for exact managed hits, hidden floating priority, overlapping floating windows, fullscreen windows, unmanaged overlays, and windows from another workspace.

Automated verification: the six focused FocusFollowsMouseTest cases, lint, and the full ./test.sh gate pass.
@Miyou
Miyou force-pushed the fix/focus-follows-mouse-transient-windows branch from aa1217a to 9c7108a Compare August 31, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-actionable By default, all PRs have this label. If the PR makes sense, the label will be removed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant