In a Cocoa app, is there a way to tell if another application currently is in full screen mode?
My application is configured to show up on all Spaces and listens for mouseEntered
events to order itself to the front.
Problem is that when another app is in full screen mode and the user happens to move the mouse across the black area where my app's window is located, it is brought to the front (happens with multiple monitors).
I've only seen the above behavior with [self setCollectionBehavior: NSWindowCollectionBehaviorCanJoinAllSpaces];
enabled.
Here the other relevant code for my app.
- (void) mouseEntered:(NSEvent *)theEvent
{
// Don't do this when another app is in full screen mode:
[[self window] orderFront:self];
}