Skip to content

Fix focus jumping when same-app floating windows closes#1914

Open
jperras wants to merge 1 commit intonikitabobko:mainfrom
jperras:fix-focus-jump-same-app-dialog-window-close
Open

Fix focus jumping when same-app floating windows closes#1914
jperras wants to merge 1 commit intonikitabobko:mainfrom
jperras:fix-focus-jump-same-app-dialog-window-close

Conversation

@jperras
Copy link

@jperras jperras commented Jan 23, 2026

Summary

Skip focus recalculation when a floating window (dialog) is destroyed if it belongs to the same app as the currently focused window.

This fixes Emacs child frames (posframes, completion popups, etc.) causing focus to jump to another application when they close.

References

Fixes #776
Fixes #1220

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.

Failure to follow the checklist with no apparent reasons will result in silent PR rejection.

Skip focus recalculation when a floating window (dialog) is destroyed if
it belongs to the same app as the currently focused window.

This fixes Emacs child frames (posframes, completion popups) causing
focus to jump to another application when they close.

Fixes nikitabobko#776
Fixes nikitabobko#1220
Davincible added a commit to Davincible/AeroSpace that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant