From c69002b0dd517e3c0e9698851a3ac457337c67e4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 31 Jul 2015 09:57:08 +0800 Subject: [PATCH] Fix: browser window will be resiable when calling `window.setResizable(false)` twice. --- atom/browser/native_window_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index d5f12bde13dd..295c0ac5400a 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -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)]; } }