Skip to content

Report focus change on window key (not main)#404

Merged
splhack merged 1 commit intomacvim-dev:masterfrom
itaiferber:master
Nov 13, 2016
Merged

Report focus change on window key (not main)#404
splhack merged 1 commit intomacvim-dev:masterfrom
itaiferber:master

Conversation

@itaiferber
Copy link
Copy Markdown
Contributor

MacVim should report FocusGained and FocusLost events not just when its windows become main, but when they become key — if a panel is opened, or a background application (i.e. an LSUIElement app) becomes active, MacVim should reflect the focus state.

For example, I use vim-focusclip to avoid polluting my clipboard with vim yanks and deletes; when I go to paste from my clipboard, I often bring up the UI for my clipboard manager (in this case, LaunchBar). Terminals send FocusLost and FocusGained events when this happens (because, say, iTerm2 sends a FocusLost event when its main window loses key, even though it is still the main window), but MacVim does not, because it only reports focus events when a window becomes or loses main. This brings feature parity, and in general, I think this is a more useful reflection of window focus.

MacVim should report FocusGained and FocusLost events not just when its
windows become main, but when they become key -- if a panel is opened,
or a background application (i.e. an LSUIElement app) becomes active,
MacVim should reflect the focus state.
@splhack splhack merged commit 04561d6 into macvim-dev:master Nov 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants