How to push a popup window above a full screen window?

Anthony Petrov anthony.petrov at
Tue Feb 21 07:01:30 PST 2012

Hi Mike,

I've further experimented and tried to set the kCGMaximumWindowLevel 
level to the popup window. The value of kCGMaximumWindowLevel is 
2147483631 which is greater than 2147483629 (the level of the 
full-screen window itself - see the quoted message). Nevertheless, the 
popup window stays behind the full screen window.

Any thoughts?

best regards,

On 2/17/2012 7:29 PM, Anthony Petrov wrote:
> Hi Mike,
> I'm currently working on 7145818 ([macosx] dialogs not showing when 
> JFrame is in full screen mode) and it seems I can't find a proper 
> solution. Here's what I did:
> 1. Tried to setLevel:(NSScreenSaverWindowLevel) to the dialog. Also 
> tried using (NSScreenSaverWindowLevel+1). No luck.
> 2. In CWrapper.NSView.enterFullScreenMode() implementation I tried passing
>> [NSApp presentationOptions], 
>> NSFullScreenModeApplicationPresentationOptions
> as an option in addition to #1. No luck.
> 3. I've also added the following option to the withOptions: dictionary 
> for NSView enterFullScreenMode:
>> [NSNumber numberWithInteger:NSNormalWindowLevel], 
>> NSFullScreenModeWindowLevel,
> which, according to the documentation, must put the full screen window 
> on the normal level. This (together with #2 and #1) didn't work either.
> I've added an fprintf() for [[view window] level] after calling 
> enterFullScreenMode:, and it always printed 2147483629 as the level of 
> the window that has just entered the full screen mode. Note that the 
> NSScreenSaverWindowLevel has a value of 1000.
> The only solution that I think could work is to abandon using NSView 
> enterFullScreenMode:, and instead emulate it by placing the window to 
> the NSScreenSaverWindowLevel when it's entering the FS mode, and also 
> calling [NSMenu setMenuBarVisible:NO] to hide the menu bar and the dock. 
> But this doesn't seem like an excellent solution.
> What could you suggest?
> [1]
> -- 
> best regards,
> Anthony

More information about the macosx-port-dev mailing list