Re: Fullscreen on secondary displays
Re: Fullscreen on secondary displays
- Subject: Re: Fullscreen on secondary displays
- From: Mike Fischer <email@hidden>
- Date: Fri, 16 May 2008 18:18:01 +0200
Am 14.05.2008 um 00:32 schrieb "dan sinclair" <email@hidden>:
I was playing a bit with Cocoa and full screen and I wrote a quick
blog
entry about it: http://everburning.com/news/going-fullscreen-with-
medium/
I'm not sure if it's the correct way, or the best way, but it does
seem to
work for me (although I believe it will limit the OS version you
can run
under).
A bit late, I know but:
1) When you pass 25 (seconds) for the reservation time of the fade
reservation that value exceeds the documented bounds of
0..kCGMaxDisplayReservationInterval (15.0 s). Use the constant instead.
2) In fadeIn don't use the synchronous method (TRUE as the last
parameter to CGDisplayFade). If you use async (FALSE) then the
CGReleaseDisplayFadeReservation will allow the fade in to complete
before releasing the token while your app can do other things like
update the windows. This avoids the white flash of the original
window (which it would have if it had any non-white content).
3) CGAcquireDisplayFadeReservation is documented to return an error
code != kCGErrorSuccess if it fails. You are ignoring that error. It
might be unlikely that someone else has reserved the fade hardware
but it is still possible. So you should deal with error conditions.
4) You might want to add a comment saying that your code is for 10.5+
only. NSView methods like isInFullScreenMode,
exitFullScreenModeWithOptions: and enterFullScreenMode:withOptions:
don't exist pre Leopard. It wouldn't be too hard to work around that
though.
Otherwise it's a nice tutorial.
HTH
Mike
--
Mike Fischer Softwareentwicklung, EDV-Beratung
Schulung, Vertrieb
Note: I read this list in digest mode!
Send me a private copy for faster responses.
_______________________________________________
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