disabling focus stealing in Mac OS X?

8

5

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!

Brian Postow

Posted 2010-06-22T18:48:46.410

Reputation: 1 035

Be more specific. What application is stealing focus? – ghoppe – 2010-06-22T18:54:03.027

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 – 2010-06-22T19:21:57.993

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 – 2010-06-22T20:01:28.683

I would like to disable it for ALL applications. It's the number 1 OS feature I hate the most in all OS'es. Linux, Windows and macOS. – dotnetCarpenter – 2018-11-21T14:23:12.497

This is such an annoying problem. Even as I type this message XCode steals input focus for each stage of its build... – Lea Hayes – 2013-12-13T16:21:33.723

Answers

1

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.

NReilingh

Posted 2010-06-22T18:48:46.410

Reputation: 5 539

0

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.

JRobert

Posted 2010-06-22T18:48:46.410

Reputation: 6 128

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 – 2010-07-15T16:12:16.173