CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion
CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion
- Subject: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion
- From: Michael Crawford <email@hidden>
- Date: Mon, 02 Jan 2012 13:30:08 -0500
I'm trying to hide the cursor when in full-screen mode on Lion but the CGDisplayHideCursor call immediately takes the display out of full-screen mode. It doesn't matter which call comes first, I get the same result every time.
Here's the code:
- (void)applicationDidFinishLaunching:(NSNotification*)notification
{
if ( NO == [[NSUserDefaults standardUserDefaults] developerMode] )
{
// disable idle and display sleep
[self disableDisplaySleep];
[self disableIdleSleep];
// enter full-screen mode
[self.window toggleFullScreen:self];
// hide cursor (mouse pointer)
CGDisplayHideCursor(kCGDirectMainDisplay);
}
// create views and pass in model for binding
menuViewController = [[JTVMenuViewController alloc] initWithPlaylist:self.moviePlaylist];
[menuViewController loadView];
movieViewController = [[JTVMovieViewController alloc] initWithPlaylist:self.moviePlaylist];
[movieViewController loadView];
movieViewController.delegate = self;
// start with the menu as the main view
[self.window.contentView setWantsLayer:YES];
[self.window.contentView addSubview:menuViewController.view];
}
-Michael
_______________________________________________
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