< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

Print this page

        

*** 380,391 **** { final boolean resizable = isFrame ? ((Frame)target).isResizable() : (isDialog ? ((Dialog)target).isResizable() : false); styleBits = SET(styleBits, RESIZABLE, resizable); if (!resizable) { styleBits = SET(styleBits, ZOOMABLE, false); - } else { - setCanFullscreen(true); } } if (target.isAlwaysOnTop()) { styleBits = SET(styleBits, ALWAYS_ON_TOP, true); --- 380,389 ----
*** 686,700 **** --- 684,704 ---- int frameState = ((Frame)target).getExtendedState(); if ((frameState & Frame.ICONIFIED) != 0) { // Treat all state bit masks with ICONIFIED bit as ICONIFIED state. frameState = Frame.ICONIFIED; } + /* Frame should be always set property WINDOW_FULLSCREENABLE to true + before showing except when the frame state is MAXIMIZED_BOTH + **/ + setCanFullscreen(true); + switch (frameState) { case Frame.ICONIFIED: execute(CWrapper.NSWindow::miniaturize); break; case Frame.MAXIMIZED_BOTH: + setCanFullscreen(false); maximize(); break; default: // NORMAL unmaximize(); // in case it was maximized, otherwise this is a no-op break;
< prev index next >