• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fullscreen mode detection from background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fullscreen mode detection from background


  • Subject: Re: Fullscreen mode detection from background
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 21 Apr 2008 13:08:49 -0500

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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Fullscreen mode detection from background (From: Peter Hoerster <email@hidden>)

  • Prev by Date: Re: Unregistering KVO observers-solved
  • Next by Date: Re: Crash when dispaying document in iChat Theater
  • Previous by thread: Fullscreen mode detection from background
  • Next by thread: Conflicting encodings issue in a Cocoa app
  • Index(es):
    • Date
    • Thread