tags:

views:

470

answers:

2

If you put up an NSAlert while your app is in the background your dock icon starts bouncing and keeps on bouncing until you switch back.

I find this annoying.

Does anyone know how disable that for a single app?

A: 

Not that I'd recommend it, but there is a Haxie that may help: Dock Detox.

They allow you to intercept the bouncing and do other stuff, I think.

A quick google showed up:

- (void)cancelUserAttentionRequest:(int)request

But I really don't know if this will work for your purposes.

Matthew Schinckel
+3  A: 

Create your own subclass of NSApplication, and implement something like this:

- (int)requestUserAttention:(NSRequestUserAttentionType)requestType
    {
        if (dontDoThatBouncyThing) {
            return 0;
        }
        return [super requestUserAttention:requestType];
    }

Don't forget to change "NSPrincipalClass" in your Info.plist from NSApplication to your own NSApplication subclass.

Dirk Stoop
This is incredibly helpful. The constant bouncing Dock icon is the bane of my existence! Thank you :)
jbrennan
Glad to be of help :)
Dirk Stoop