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

Anthony Petrov anthony.petrov at
Fri Feb 17 07:29:56 PST 2012

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?


best regards,

More information about the macosx-port-dev mailing list