The active window on my machine occasionally loses focus. The active app remains the same -- if I was in Chrome before, I'm still in Chrome now -- but the active window is no longer active. No window is active. This is frustrating; it happened while typing this question, and my keystrokes suddenly stopped registering.
I believe that some other app is stealing focus, but that it itself has no UI to display, so the active window becomes not active, but the active app remains active.
The question is: How do I track down the offending app, so that I can angrily delete it? Normally in cases of focus theft, the culprit is obvious, because it has focus. In this case, I'm stumped.
Apple > Force Quit...
menu to see if there is anything running that shouldn't be.LSUIElement
set totrue
inInfo.plist
). Those are perfectly capable of that behavior.tell application "System Events" to display alert ((name of first application process whose frontmost is true) as string)
unfortunately does not consider processes without menu bar.