src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
changeset 49225 e0b025915be8
parent 47827 f2238a5326e7
child 49305 2f2b37908f91
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Mar 07 18:20:09 2018 +0530
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Mar 07 14:54:46 2018 +0530
@@ -382,8 +382,6 @@
             styleBits = SET(styleBits, RESIZABLE, resizable);
             if (!resizable) {
                 styleBits = SET(styleBits, ZOOMABLE, false);
-            } else {
-                setCanFullscreen(true);
             }
         }
 
@@ -677,6 +675,15 @@
 
         // Manage the extended state when showing
         if (visible) {
+            /* Frame or Dialog should be set property WINDOW_FULLSCREENABLE to true if the
+            Frame or Dialog is resizable.
+            **/
+            final boolean resizable = (target instanceof Frame) ? ((Frame)target).isResizable() :
+            ((target instanceof Dialog) ? ((Dialog)target).isResizable() : false);
+            if (resizable) {
+                setCanFullscreen(true);
+            }
+
             // Apply the extended state as expected in shared code
             if (target instanceof Frame) {
                 if (!wasMaximized && isMaximized()) {