Preserve and restore focus across window activation cycles#47044
Merged
mikayla-maki merged 1 commit intomainfrom Jan 17, 2026
Merged
Preserve and restore focus across window activation cycles#47044mikayla-maki merged 1 commit intomainfrom
mikayla-maki merged 1 commit intomainfrom
Conversation
When a window deactivates, save the current focus and clear it. When the window reactivates, restore the saved focus. This keeps window.focus consistent with focus events (which use empty paths when inactive) and prevents spurious focus changes on reactivation that could trigger unintended behavior like dismissing zoomed dock panels. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merged
Member
|
I'm not sure why yet but this seems to have broken emoji input on macOS with the cmd-control-space picker. 'm reverting in #47835 |
zed-zippy Bot
added a commit
that referenced
this pull request
Jan 28, 2026
Cherry-pick of #47835 to preview ---- - **Revert "ui: Dismiss context menus when window loses focus (#46866)"** - **Revert "Preserve and restore focus across window activation cycles (#47044)"** Closes #ISSUE Release Notes: - (preview only) Fixed typing emoji using the macOS system palette (cmd-ctrl-space) Co-authored-by: Conrad Irwin <conrad.irwin@gmail.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.
Closes #46953
This turned out to be a pretty deep rabbit hole, ultimately landing in how GPUI didn't restore focus nicely when swapping window activation states.
Release Notes: