jdk/src/macosx/native/sun/awt/AWTWindow.m
changeset 14648 2ef7c7edb4b0
parent 14311 b2492ea8d08e
child 14651 f032406c1e48
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Nov 21 15:50:34 2012 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Nov 21 15:54:41 2012 +0400
@@ -160,6 +160,10 @@
         BOOL resizable = IS(bits, RESIZABLE);
         [self updateMinMaxSize:resizable];
         [self.nsWindow setShowsResizeIndicator:resizable];
+        // Zoom button should be disabled, if the window is not resizable,
+        // otherwise button should be restored to initial state.
+        BOOL zoom = resizable && IS(bits, ZOOMABLE);
+        [[self.nsWindow standardWindowButton:NSWindowZoomButton] setEnabled:zoom];
     }
 
     if (IS(mask, HAS_SHADOW)) {
@@ -784,7 +788,7 @@
 
         // calls methods on NSWindow to change other properties, based on the mask
         if (mask & MASK(_METHOD_PROP_BITMASK)) {
-            [window setPropertiesForStyleBits:bits mask:mask];
+            [window setPropertiesForStyleBits:newBits mask:mask];
         }
 
         window.styleBits = newBits;