Recently I have stumbled upon a bug that is hard as h*ll to track down:
Intermittently, CMD+Tab doesn’t work, nor can I use the mouse to click on things. I am able to switch applications other ways (via Spotlight or KM shortcuts), and everything else seems to work.
After a period of time, maybe 20 to 40 seconds, it all works again, and the CMD+Tabs I have done now takes actions.
If I during this period looks what takes CPU I can’t see nothing strange, and I really can’t see what’s causing this.
This is of course extremely annoying! How can I troubleshoot this without reinstalling everything?
After starting to quitting all open apps and processes it finally started to work again after quitting OmniFocus.
However, that may also be because the time went out (as mentioned, the problem only lasts about 40 secs).
I have the same problem since the first Ventura beta, I hoped it would be fixed by now.
I am at least able to switch apps using rcmd even when Command Tab fails, but I can’t launch any app.
This is especially noticeable for me when I am constantly building and launching Lunar in Xcode, and suddenly it stalls at Attaching to Lunar and never finishes until I click randomly in the Xcode UI 5-10 times.
I never used Amphetamine, although I do use App Tamer which also hooks some of the same APIs. But I tested a day with App Tamer quit and it didn’t help, so I suspect this is a macOS problem.
There’s no noticeable CPU usage in htop, it’s not an overload problem. It looks more like something is stalled in the input event queue of the system. No idea how I could debug this.
That’s not an issue, it’s the distinction between windows and apps that macOS has but Windows users are not used to. You can go to the Windows behaviour with the Swift Quit app.
The button on a window is for closing that window. It is equivalent to pressing ⌘ Command + W on the keyboard. An app is not its windows though, it can have other UI elements that are not windows.
And in specific cases you would want the app to remain open after closing the last window, to avoid wasting time/CPU on the app launch routine if you use that app often. That’s usually useful for document based apps like Word, Excel, Pages, Photoshop, Affinity etc.
Quitting the app is separate from closing the window in macOS and is usually done with ⌘ Command + Q.
Some apps do quit after the last window is closed, but that’s left as a choice for the app developer to do.
Anyway, it’s not what’s happening here. This is a user interface stalling problem, where the Launch Services daemon doesn’t react anymore and input events are not getting to the foreground app.
Others have chimed in with additional useful information. But to answer your question, minimizing is not really bad. Closing, opening, minimizing, and hiding windows (lowercase “W”) is just different between Windows (cap “W”) and macOS. I had to break established keyboard habit and teach myself to use CMD+H on my Macs. My memory from a long time ago is that minimized apps on Mac did not show up in the CMD+TAB switcher whereas they did on Windows in its ALT+TAB switcher.(For decades, I used Windows PCs at work and Macs at home.)
Apps with minimized windows do show up with Cmd-Tab.
However, minimized windows themselves will not appear when you Cmd-Tab to their app.
Also, I’m pretty sure (but not positive, and on mobile) that minimized windows won’t appear when you Cmd-backtick to cycle through windows (when you’re in their app).
In other words, for app- and window-switching by keyboard, a minimized window might as well not be there, which can be mysterious and frustrating.
Hiding, on the other hand, hides the app and all its windows, but they reappear and behave as expected if you return to the app, including by Cmd-Tab.