Skip to content

Commit

Permalink
Merge pull request #5944 from electron/set-maximizable-last
Browse files Browse the repository at this point in the history
Set maximizable state after installing view
  • Loading branch information
zcbenz committed Jun 9, 2016
2 parents b422c47 + 9f93f4e commit 0abd552
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions atom/browser/native_window_mac.mm
Expand Up @@ -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];

Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 0abd552

Please sign in to comment.