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 (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 arch...@mail-archive.com

Reply via email to