From 9f93f4e27f9c5dcdb36759793f1c13df31cf7314 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 8 Jun 2016 13:56:45 -0700 Subject: [PATCH] Set maximizable state after installing view --- atom/browser/native_window_mac.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 73aa3017eb3..8de4b109373 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -524,10 +524,6 @@ NativeWindowMac::NativeWindowMac( 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 @@ NativeWindowMac::NativeWindowMac( }]; 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() {