• 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: Display sleep vs. enterFullScreenMode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display sleep vs. enterFullScreenMode


  • Subject: Re: Display sleep vs. enterFullScreenMode
  • From: "Shayne Wissler" <email@hidden>
  • Date: Thu, 1 Jan 2009 13:43:01 -0800

Is there any way to re-enable the display sleep timer? Or do I need to
implement my own display sleep timer if I use that API?

Thanks for your help.


Shayne Wissler

On Wed, Dec 31, 2008 at 4:34 PM, Sean McBride <email@hidden> wrote:
> Shayne Wissler (email@hidden) on 2008-12-31 3:11 PM said:
>
>>I have an application that uses NSView's
>>enterFullScreenMode/exitFullScreenModeWithOptions in order to toggle
>>between fullscreen and normal display mode. Evidently, the default
>>behavior while in full screen mode is to disable OSX's display sleep
>>timer. How can I re-enable it? I do not want my application to
>>interfere with the user's default sleep settings (unless my
>>application explicitly needs to when it's in a given mode--but that
>>doesn't depend on whether it's in fullscreen or normal mode).
>
> I can confirm your results.  enterFullScreenMode is not documented to
> have that effect.  It ends up calling CGDisplayCapture(), perhaps it is
> responsible for that.
>
> Sigh.  Another reason to avoid enterFullScreenMode I'm afraid.  Here's
> my list of why:
>
> - prevents display sleep
> - does not allow menubar to autoshow/hide
> - does not allow dock to autoshow/hide
> - does not allow cmd-tabbing between apps
> - does not allow exposé to be invoked
> - invoking force quit kills the app instead of showing force quit dialog
> - documentation says you can choose the window level
> (NSFullScreenModeWindowLevel), but implementation does not honour it,
> instead always uses kCGMaximumWindowLevel-1.
> - using SetSystemUIMode() does not work with enterFullScreenMode
> - other apps are not notified when your app goes fullscreen
> (kEventAppSystemUIModeChanged Carbon event)
> - going fullscreen invokes "-(void)viewWillMoveToSuperview:
> (NSView*)newSuperview" with a nil newSuperview.  This is the condition
> that one generally uses to call unbind: on one's view.
> <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html#unbinding>
>
> Hopefully in 10.6 this API will become usable.
>
> Sean
>
>
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Display sleep vs. enterFullScreenMode
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: Which language to get started with cocoa development?
  • Next by Date: Re: Which language to get started with cocoa development?
  • Previous by thread: Re: Making an object release itself?
  • Next by thread: Re: Display sleep vs. enterFullScreenMode
  • Index(es):
    • Date
    • Thread