Merge pull request #2389 from atom/resize-mask-flag

Fix a bug calling setResizable multiple times will take no effect on OS X.
This commit is contained in:
Cheng Zhao 2015-08-03 14:52:40 +08:00
commit 666a2233a7

View file

@ -589,7 +589,7 @@ void NativeWindowMac::SetResizable(bool resizable) {
[window_ setStyleMask:[window_ styleMask] | NSResizableWindowMask];
} else {
[[window_ standardWindowButton:NSWindowZoomButton] setEnabled:NO];
[window_ setStyleMask:[window_ styleMask] ^ NSResizableWindowMask];
[window_ setStyleMask:[window_ styleMask] & (~NSResizableWindowMask)];
}
}