Re: NSView enterFullScreenMode:withOptions: woes; window levels
Re: NSView enterFullScreenMode:withOptions: woes; window levels
- Subject: Re: NSView enterFullScreenMode:withOptions: woes; window levels
- From: "Sean McBride" <email@hidden>
- Date: Tue, 18 Mar 2008 10:29:21 -0400
- Organization: Rogue Research
On 3/18/08 12:05 AM, Brian Christensen said:
>> 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.
Thanks Brian for confirming my fears. :) For anyone reading the
archives, I recommend staying away from NSView's enterFullScreenMode (in
10.5.2 at least) for all but the most trivial cases.
- there seems to be no way to change window level <rdar://5804777>
- you can't allow the menu bar nor dock to auto unhide when moused over
<rdar://5287546>
- it interferes with the usual way of unbinding
(viewWillMoveToSuperview:) <rdar://5497135>
- you can't specify an animated transition to/from full screen
This all seems to be due to capturing the screen instead of using using
SetSystemUIMode(). Pity.
>You might alternately try to set the window level on your floating
>palette instead, ie. [paletteWindow setLevel:kCGMaximumWindowLevel].
Yes, that is my current workaround.
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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