I have a MacBook Pro running Catalina with an additional display. I typically have my development-related apps on one display (iTerm2, VSCode, etc.) and everything else on the other display (Chrome, Slack, etc.)
Sometimes (not all the time), when I switch desktops (Ctrl+left
or Ctrl+right
), access an app using Spotlight (Cmd+space
and type), or use Cmd+Tab
to switch applications, the focus would suddenly jump to iTerm2 or VSCode. This happens even if iTerm2 or VSCode isn't currently showing; for example, if I try to switch to Chrome on display 1 and iTerm2 is on a different hidden desktop on display 2, Chrome would appear on display 1 and then display 2 would show the desktop containing iTerm2 sliding into view (along with focusing iTerm2).
This severely impacts workflow, since this behavior is unpredictable and involves a lot of typing in the wrong application and reaching for the mouse. What is causing this behavior?
Ctrl+left
orCtrl+right
but also with mouse gestures on my Logitech MX Master 3. In my case I have Microsoft Outlook full-screen on the other display, and it gets focus instead of iTerm2 or Firefox or VSCode or whatever is shifted into view. Outlook seems to grab focus even if it is the last app on theCmd-tab
list, and even if there are other apps currently displaying full screen on the other display. – Killick