Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Finder Periodically Stealing Focus

About the time the macOS 10.15.2 Update came out, the Finder started periodically stealing focus. I haven't timed it, but it seems almost regular. In the time to type this post, it's happened three times.


It's impossible to do any sustained typing and the frequency that keystrokes go to the Finder instead instead of the application you think your working in, is beyond frustrating.


I think it is something causing the Finder to crash and restart, because if I quit the Finder, the problem does not occur and shortly after restarting the Finder, the problem returns. I don't think it's due to the 10.15.2, it just started about the some time the update came out.

Mac mini, macOS 10.13

Posted on Dec 16, 2019 4:13 AM

Reply
Question marked as Best reply

Posted on Dec 19, 2019 10:10 AM

This may help. I've noticed when the app I'm in suddenly drops to the desktop, it doesn't appear to really be the Finder that's active. Rather, some other background process has jumped to the foreground, but its name doesn't show at the upper left because it's not meant to be seen.


I found this discussion about it. Look in particular at the second entry (with 21 likes). It's a rather simple Python script that prints the name of whatever app is currently in over the foreground every 3 seconds. For the user who posted the script, it helped them discover the culprit was SymUIAgent.app.


It's a bit hard at first to understand what you're supposed to do with the information since it isn't described well, but it's actually very simple. Grab this text:


#!/usr/bin/python

from AppKit import NSWorkspace
import time
t = range(1,100)
for i in t:
    time.sleep(3)
    activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName']
    print activeAppName


Copy/paste it into a plain text, TextEdit document. Save it as any name you want, just so long as it ends with .py . The author used find_focus_stealer.py since that makes it easy to remember with that Python script is for.


Open Terminal and type python, followed by a space. Drag and drop the TextEdit document you just created into the Terminal window. It's location and name will be added to the command you started. Press Enter.


The script will now print out the name of whatever the foreground app is every three seconds. Just leave it running in the background as you work. When the Mac drops to the desktop, refrain from pressing anything until the script records what just took over the foreground. That's the troublemaker.


I have a lot of third party stuff loaded because it needs to be there for various third party apps and hardware. My suspicion is the Wacom driver, but it could be something else. I've only run it long enough so far to see that, yup, the script works.

Similar questions

5 replies
Question marked as Best reply

Dec 19, 2019 10:10 AM in response to Kurt Lang

This may help. I've noticed when the app I'm in suddenly drops to the desktop, it doesn't appear to really be the Finder that's active. Rather, some other background process has jumped to the foreground, but its name doesn't show at the upper left because it's not meant to be seen.


I found this discussion about it. Look in particular at the second entry (with 21 likes). It's a rather simple Python script that prints the name of whatever app is currently in over the foreground every 3 seconds. For the user who posted the script, it helped them discover the culprit was SymUIAgent.app.


It's a bit hard at first to understand what you're supposed to do with the information since it isn't described well, but it's actually very simple. Grab this text:


#!/usr/bin/python

from AppKit import NSWorkspace
import time
t = range(1,100)
for i in t:
    time.sleep(3)
    activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName']
    print activeAppName


Copy/paste it into a plain text, TextEdit document. Save it as any name you want, just so long as it ends with .py . The author used find_focus_stealer.py since that makes it easy to remember with that Python script is for.


Open Terminal and type python, followed by a space. Drag and drop the TextEdit document you just created into the Terminal window. It's location and name will be added to the command you started. Press Enter.


The script will now print out the name of whatever the foreground app is every three seconds. Just leave it running in the background as you work. When the Mac drops to the desktop, refrain from pressing anything until the script records what just took over the foreground. That's the troublemaker.


I have a lot of third party stuff loaded because it needs to be there for various third party apps and hardware. My suspicion is the Wacom driver, but it could be something else. I've only run it long enough so far to see that, yup, the script works.

Dec 18, 2019 1:28 PM in response to ray-n-tosca

I thought it was just me. Yes, the Finder, for completely unknown reasons, suddenly becomes the foreground app. You don't have to touch the desktop with your mouse or anything else that would make the Finder the frontmost app. You're all of a sudden just "there".


In a typical 8 hour period doing client work, this happens at least a dozen times per day.


It did this in Mojave, too.

Finder Periodically Stealing Focus

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.