Empty window appears when going fullscreen in awakeFromNib
Empty window appears when going fullscreen in awakeFromNib
- Subject: Empty window appears when going fullscreen in awakeFromNib
- From: Jonathan Selander <email@hidden>
- Date: Wed, 4 Feb 2009 11:51:33 +0100
I have a program that goes into fullscreen like this:
- (IBAction) goFullScreen:(id)sender
{
// bort med dock och menubar, motverka tvångsavluta, alt+tab och
utloggning
SetSystemUIMode(kUIModeAllHidden, kUIOptionDisableAppleMenu |
kUIOptionDisableForceQuit |
kUIOptionDisableProcessSwitch |
kUIOptionDisableSessionTerminate);
NSScreen *screen = [[contentView window] screen];
NSWindow *window = [[NSWindow alloc] initWithContentRect:[screen
frame]
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:screen];
[contentView retain];
[contentView removeFromSuperview];
[window setContentView:contentView];
[contentView release];
[window makeKeyAndOrderFront:sender];
[NSCursor setHiddenUntilMouseMoves:YES];
[fullScreenButton removeFromSuperview];
[mainWindow close];
[self _reloadRenderers];
}
This works fine if I bind a button to call the function after the
program has loaded, but I need it to enter fullscreen when the
application is launched, and when i do that an empty window is put in
front (I think it's mainWindow). How can I prevent this from happening
when calling this function when the application launches?_______________________________________________
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