7197320: [macosx] Full Screen option missing when Window.documentModified
authoralexsch
Fri, 14 Sep 2012 15:08:54 +0400
changeset 13777 c94cf7e1bac2
parent 13776 e36d4f20eda7
child 13778 0ba9254a04ad
7197320: [macosx] Full Screen option missing when Window.documentModified Reviewed-by: anthony
jdk/src/macosx/native/sun/awt/AWTWindow.m
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Thu Sep 13 21:23:23 2012 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Fri Sep 14 15:08:54 2012 +0400
@@ -178,8 +178,8 @@
         [self.nsWindow setDocumentEdited:IS(bits, DOCUMENT_MODIFIED)];
     }
 
-    if ([self.nsWindow respondsToSelector:@selector(toggleFullScreen:)]) {
-        if (IS(mask, FULLSCREENABLE)) {
+    if (IS(mask, FULLSCREENABLE) && [self.nsWindow respondsToSelector:@selector(toggleFullScreen:)]) {
+        if (IS(bits, FULLSCREENABLE)) {
             [self.nsWindow setCollectionBehavior:(1 << 7) /*NSWindowCollectionBehaviorFullScreenPrimary*/];
         } else {
             [self.nsWindow setCollectionBehavior:NSWindowCollectionBehaviorDefault];