On Apr 21, 2008, at 7:24 AM, Peter Hoerster wrote:
is there a method to detect from the background if a foreground program is running in fullscreen mode? I have to hide a floating panel when a video or game software is running fullscreen.
It depends on what you mean by fullscreen mode. Most programs which have a fullscreen mode capture the display(s) with CGDisplayCapture* () or CGCaptureAllDisplays*(). If they do that, then I don't think you have to worry about it -- by design, the GUI of other applications won't display and they won't be informed of the change in display configuration. (That's the point of capturing the display. You don't want the Finder to rearrange all of your desktop icons when you change resolutions, for example.)
If by fullscreen mode you mean that the frontmost application has hidden the menubar and Dock via SetSystemUIMode, then you may need to monitor the mode by installing a Carbon event handler for the kEventAppSystemUIModeChanged event. I assume, but can't be sure, that [NSMenu setMenuBarVisible:NO] uses SetSystemUIMode under the hood, and thus generates the same Carbon event.
Cheers, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]