Report focus change on window key (not main)#404
Merged
splhack merged 1 commit intomacvim-dev:masterfrom Nov 13, 2016
itaiferber:master
Merged
Report focus change on window key (not main)#404splhack merged 1 commit intomacvim-dev:masterfrom itaiferber:master
splhack merged 1 commit intomacvim-dev:masterfrom
itaiferber:master
Conversation
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.
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.
MacVim should report
FocusGainedandFocusLostevents not just when its windows become main, but when they become key — if a panel is opened, or a background application (i.e. anLSUIElementapp) 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
FocusLostandFocusGainedevents when this happens (because, say, iTerm2 sends aFocusLostevent 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.