"Focus follows mouse" bug: switch focus to window when cursor is moved _indirectly_ over it
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.1.6beta5
- OS version: macOS 10.13.3[com.googlecode.iterm2.plist]
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window) -- (/uploads/85b4d1983240aa4b9d15dae6a1e69b93/com.googlecode.iterm2.plist)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample -- Usage issue.
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs -- Not crash Detailed steps to reproduce the problem:
-- make sure preference/pointer: Focus follows mouse is checked
- open iTerm window B full screen at bottom
- open another window U on top of B and covers left half screen: U is the active iTerm window (cursor over U)
- command+tab switch to another app window W: make sure part of W overlaps B but doesn't cover U. call this part W.T.
- now W is current app, W is over U, U is over B, W.T is over B not U, and U is active iTerm window.
- move mouse cursor to W.T part.
- command+tab switch to iTerm: do not click mouse or track pad
-- iTerm active window switches from U to B: this is not desired behavior
This is tricky, because it seems there's nothing wrong because the active window or focus does follow the cursor. The problem is when I switch to W (usually a browser to look up something online), I'm working on some stuff in active window U. When I'm browsing in W, I may move the cursor anywhere inside it -- quite often when I switch back to iTerm, the cursor is inside W.T.
With current behavior, when I switch back to iTerm with cursor inside W.T, I land in full screen window B, but I really want to continue my work in window U. This breaks my workflow. I have to disable the "focus follows mouse" option, even though I really like this option.
Note that if the cursor is already over W.T before switching from iTerm to W, and I don't move the cursor in any way, U remains as the active iTerm when I switch from W to iTerm. This is desired behavior but I must remember not to move the cursor, and in most cases I do want to move the cursor.
What should have happened:
The focus changes only when the cursor has been moved directly over an iTerm window and stops inside it. Moving the cursor over W.T (which is indirectly over B) should not switch active window from U to B.