Skip to content

Treat emacs child frames as popups#2036

Open
jperras wants to merge 1 commit intonikitabobko:mainfrom
jperras:emacs-child-frame-detector-heuristics
Open

Treat emacs child frames as popups#2036
jperras wants to merge 1 commit intonikitabobko:mainfrom
jperras:emacs-child-frame-detector-heuristics

Conversation

@jperras
Copy link
Copy Markdown

@jperras jperras commented Mar 31, 2026

Emacs has a concept of "child frames", which are effectively transient UI elements. These should not be managed by Aerospace.

These child frames are now detected by checking for an AXSubrole of AXFloatingWindow, and AXMain with value 0 for the emacs bundle ID.

This fixes the focus jumping issue when using Emacs completion/info popups (via common packages such as corfu, posframes, etc.) with AeroSpace.

Closes #776
Closes #1220
Refs. #1914

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/
  • Don't forget to link the appropriate issues/discussions in commit messages (if applicable).
  • Each commit must be an atomic change (a PR may contain several commits). Don't introduce new functional changes together with refactorings in the same commit.
  • ./run-tests.sh exits with non-zero exit code.
  • Avoid merge commits, always rebase and force push.

@jperras
Copy link
Copy Markdown
Author

jperras commented Mar 31, 2026

@nikitabobko I realize my PR description is pretty verbose compared to the actual commit message for the change. I'm happy to force push/change the commit message to be more descriptive, and/or amend the PR body, too.

@nikitabobko
Copy link
Copy Markdown
Owner

I realize my PR description is pretty verbose compared to the actual commit message for the change. I'm happy to force push/change the commit message to be more descriptive, and/or amend the PR body, too.

@jperras Please do. I want to depend on GitHub as less as possible. All the information should be pushed directly into the git history (or code comments when appropriate) as much as possible

@jperras jperras force-pushed the emacs-child-frame-detector-heuristics branch from a1c9a67 to 8b5a7bc Compare April 5, 2026 02:06
@jperras jperras requested a review from nikitabobko April 5, 2026 02:06
@jperras
Copy link
Copy Markdown
Author

jperras commented Apr 5, 2026

@nikitabobko added comments to the existing dumps, added an additional dump for a normal emacs window with no popups, and amended the commit message to be more informative. Everything squashed and force-pushed to this PR branch.

Emacs has a concept of "child frames", which are effectively transient
UI elements. These should not be managed by Aerospace.

These child frames are now detected by checking for an AXSubrole of
AXFloatingWindow, and AXMain with value 0 for the emacs bundle ID.

Closes nikitabobko#776
@jperras jperras force-pushed the emacs-child-frame-detector-heuristics branch from 8b5a7bc to 9d4be4b Compare April 5, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants