I have a program that works in the background but whenever it does something, it steals mouse focus. Often, while I'm in the middle of typing something. Needless to say, this is very annoying.

Is it possible to make it so that the program can't do this? Instead it just bounces the dock icon? That's plenty annoying to get me to look at it. Nothing that it is saying is so important that it needs to be dealt with immediately!

link|improve this question

45% accept rate
Be more specific. What application is stealing focus? – ghoppe Jun 22 '10 at 18:54
on linux boxen i generally enable focus-follows-mouse in the window manager to deal with this behavior. if a popup steals focus, moving the mouse back over an open window puts it back. dunno what options OSX provides in that way, tho; maybe someone else can add an answer that tells how to do that. – quack quixote Jun 22 '10 at 19:21
It's a system program that you'll never have heard of... when it normally lives on a server, no one cares, or this behavior is actually good, but while trying to actually WORK on the system, it's a pain... – Brian Postow Jun 22 '10 at 20:01
feedback

3 Answers

AFAIK, focus on OS X is dictated by the application doing the stealing as well as the application which currently has focus (it is possible, for example, to program an "autocratic" UI application, such as a game).

That said, it may be practical in your situation to modify the focus-stealing app itself. Inside the app bundle is an Info.plist. Add the LSUIElement key and set it to 1. This will (should) remove all trace of UI or dock icon, though it will still be visible in activity monitor.

If you need to interact with this app's UI on a regular basis, this probably isn't practical. It might be just what you need, however, if you don't need to do more than launch it. Assuming it works with that app, that is.

link|improve this answer
feedback

Try hiding the program. I don't know how to setup an experiment without knowing/having your program, but it'll be quick to do.

link|improve this answer
nope, tried that, the program un-hides itself when it thinks it has something important to say... It's a VERY invasive program... – Brian Postow Jul 15 '10 at 16:12
feedback

A program which steals focus is for instance the microsoft remote desktop software for osx. To reproduce:

1) start the remote desktop software (rdp client) 2) get back to some other program and start typing (I generally type at very high speed) 3) suddenly the rdp client displays a dialog about the server to connect to (it is pre-filled in 4) my typing immediately overwrites the pre-filled in IP address 5) I have to restart the rdp client. So annoying

This is so very annoying. Why do some programs expect me to wait for them to start? I'm not. I start them, and will get back to them in a jiffy. I'm not waiting for them to start.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.