Full screen and popup menu
Full screen and popup menu
- Subject: Full screen and popup menu
- From: Don Willems <email@hidden>
- Date: Thu, 23 Sep 2004 23:52:08 +0200
Hi,
I have an application which uses the following code to create a full
screen window:
int windowLevel;
NSRect screenRect;
if (CGDisplayCapture( kCGDirectMainDisplay ) !=
kCGErrorSuccess) {
NSLog( @"Couldn't capture the main display!" );
fullScreen = NO;
}else{
window = [[NSWindow alloc]
initWithContentRect:NSMakeRect(100,100,800,600)
styleMask:NSBorderlessWindowMask
backing:(NSBackingStoreType)NSBackingStoreBuffered defer:YES];
windowLevel = CGShieldingWindowLevel();
//windowLevel = NSStatusWindowLevel; // <--------
------------------------
screenRect = [[NSScreen mainScreen] frame];
[window setLevel:windowLevel];
[window makeKeyAndOrderFront:nil];
[window setFrame:screenRect display:YES];
[window setAcceptsMouseMovedEvents:YES];
fullScreen = YES;
}
[window setContentView:controlView];
[window orderFront:self];
This works fine except for one thing. The window contains a popup
button. But the popup menu is not displayed because the level of the
menu is behind the window level.
So when I change the window level to be below the popup level, the menu
should display in front of the window, right?
But when I uncomment
//windowLevel = NSStatusWindowLevel; // <--------
------------------------
I get a black screen. I even get a black screen if I use
NSScreenSaverWindowLevel.
Any ideas?
Thanks,
Don
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden