On Mar 17, 2008, at 4:51 , Sean McBride wrote:

Hi all,

Is anyone using the new NSView full screen methods in 10.5?

I have a window which contains a 'group view', it is basically an NSView
that contains two subviews: a button, and an custom NSView that draws
pretty pictures.  The button displays a floating palette (NSPanel).

My ultimate goal is to make the 'group view' full screen but allow the
floating palette to be above it.

If I do:

NSDictionary* options = [NSDictionary
 dictionaryWithObjectsAndKeys:
                  [NSNumber numberWithInt:kCGNormalWindowLevel],
   NSFullScreenModeWindowLevel, nil];
[groupView enterFullScreenMode:[NSScreen mainScreen]
 withOptions:options];
NSLog (@"level %d", [[groupView window] level]);

Then it does go fullscreen, but the window level is
kCGMaximumWindowLevel-1, not kCGNormalWindowLevel.  As such, my panel
(at kCGFloatingWindowLevel) is invisible.

Am I doing something wrong here?  Shouldn't the window level be what I
told it to be?

I am unsure why this is even presented as an option for the mode dictionary. To my knowledge the CGDirectDisplay API (which is what the enterFullScreenMode: method is using under the hood) does not support specifying your own shielding window level. The result is that the window hosting your NSView is going to have to be promoted to a window level that is equal to or higher than the result of CGShieldingWindowLevel(). Otherwise it would be covered by the blanking window created by the display API.

You might alternately try to set the window level on your floating palette instead, ie. [paletteWindow setLevel:kCGMaximumWindowLevel].

/brian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to