I guess I should check if [NSApplication presentationOptions]
contains NSFullScreenModeApplicationPresentationOptions
, but how do I achieve that?>
You need to use an & bitwise operator to test that that option is being used. Not tested but probably something like this:
- (BOOL) inFullScreenMode {
NSApplicationPresentationOptions opts = [[NSApplication sharedApplication ] presentationOptions];
if ( opts & NSApplicationPresentationFullScreen) {
return YES;
}
return NO;
}
To see if any of your windows are in full screen mode simply check the style mask of the window.
NSUInteger masks = [someNSWindow styleMask]
if ( masks & NSFullScreenWindowMask) {
// Do something
}