Exit fullscreen with fade
Exit fullscreen with fade
- Subject: Exit fullscreen with fade
- From: Mirko Viviani <email@hidden>
- Date: Mon, 29 Jun 2009 00:43:35 +0200
Hi,
I use an empty window for fullscreen mode using SetSystemUIMode to
hide all system widgets and screen fade.
This code used for entering fullscreen mode causes no problems at all,
but using to exit fullscreen
produce a strange behaviour.
When I close the window and set the system UI mode to normal, the
window disappear, the dock and the menu bar
fade in progressively, but the desktop is completely black until the
application reach the event loop.
Is there a way to fix this?
Thank you.
- (void) fadeAll: (id) sender;
{
CGDisplayFadeReservationToken token;
CGDisplayErr err = kCGErrorSuccess;
err =
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval,
&token);
if (err != kCGErrorSuccess)
return;
err = CGDisplayFade(token, 1, kCGDisplayBlendNormal,
kCGDisplayBlendSolidColor, 0, 0, 0, true);
[fullscreenWindow orderOut: self];
[fullscreenWindow close];
SetSystemUIMode(kUIModeNormal, 0);
err = CGDisplayFade(token, 1, kCGDisplayBlendSolidColor,
kCGDisplayBlendNormal, 0, 0, 0, true);
err = CGReleaseDisplayFadeReservation(token);
}
--
Ciao,
Mirko
_______________________________________________
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