Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

An application on my Mac seems to want to take focus away roughly every 4-5 minutes. I hate to complain, but it is quite distracting and rather irritating. If I am in the middle of typing and not paying attention my keystrokes will be lost, and I have to click on the active window to regain focus.

Unfortunately I do not know what process is causing this. Whatever it is does not change the name of the current window process. For example, while typing this, I will lose focus on Google Chrome, but the menu will remain Chrome. The active window simply loses focus, inexplicably.

I would like to know how to detect what this process is that is taking focus.

I have considered a polling of the currently focused window with something like:

$ watch currentWindowFocusedName

Unfortunately, I do not know of a currentWindowFocused command, but it's where my thoughts start.

I have eliminated all open applications yet the issue persists, so I imagine it must be a background process of some sort, but I have 177 of those and I am not sure which ones can be safely closed.

Any assistance would be greatly appreciated.

share|improve this question
    
If it happens every 4-5 minutes, I would recommend creating a test user account on the Mac and working for a bit under that account. If it does NOT happen, compare the processes in each user's Activity Monitor list. If it DOES happen, then it is probably a system-wide process, not a user process. Hopefully that can at least be a starting point. – bispymusic Mar 2 '13 at 20:23
    
@bispymusic: Great call. I did something like this - slowly eliminating groups of processes. Alas, I was too impatient to identify the offender. :) – Brian M. Hunt Mar 2 '13 at 22:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.