• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Full screen and popup menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Full screen and popup menu
      • From: Glenn Andreas <email@hidden>
  • Prev by Date: Add duplicate menu items
  • Next by Date: Re: Unit testing framework suggestions?
  • Previous by thread: Re: Add duplicate menu items
  • Next by thread: Re: Full screen and popup menu
  • Index(es):
    • Date
    • Thread