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
Use notifications. For example:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(willEnterFull:)
name:NSWindowWillEnterFullScreenNotification
object:nil];
Actually, you'll probably want to use NSDistributedNotificationCenter instead, since it goes across processes.
You're adding your object as an observer, so that when something else posts a notification that it will enter full screen, your object will receive that notification.
The selector is the message/method you want called by the notification process.
The name parameter is the actual name of the notification. These are standard, unless you were to create a custom notification for something you would be using.
The object parameter is for specifying which object you want to receive notifications from. Since you want to know when ANY app is going full screen, you'd want to leave this nil.
Remember to remove your object as an observer before it's deallocated!