diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 73aa3017eb3fe..8de4b109373a7 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -524,10 +524,6 @@ - (void)drawRect:(NSRect)dirtyRect { options.Get(options::kDisableAutoHideCursor, &disableAutoHideCursor); [window_ setDisableAutoHideCursor:disableAutoHideCursor]; - // Disable zoom button if window is not resizable. - if (!maximizable) - SetMaximizable(false); - NSView* view = inspectable_web_contents()->GetView()->GetNativeView(); [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; @@ -555,6 +551,12 @@ - (void)drawRect:(NSRect)dirtyRect { }]; InstallView(); + + // Disable zoom button if window is not resizable. + // Set maximizable state last to ensure zoom button does not get reset + // by calls to other APIs. + if (!maximizable) + SetMaximizable(false); } NativeWindowMac::~NativeWindowMac() {