Set maximizable state after installing view
This commit is contained in:
parent
f4c1cd11a0
commit
9f93f4e27f
1 changed files with 6 additions and 4 deletions
|
@ -524,10 +524,6 @@ NativeWindowMac::NativeWindowMac(
|
||||||
options.Get(options::kDisableAutoHideCursor, &disableAutoHideCursor);
|
options.Get(options::kDisableAutoHideCursor, &disableAutoHideCursor);
|
||||||
[window_ setDisableAutoHideCursor:disableAutoHideCursor];
|
[window_ setDisableAutoHideCursor:disableAutoHideCursor];
|
||||||
|
|
||||||
// Disable zoom button if window is not resizable.
|
|
||||||
if (!maximizable)
|
|
||||||
SetMaximizable(false);
|
|
||||||
|
|
||||||
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
|
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
|
||||||
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||||
|
|
||||||
|
@ -555,6 +551,12 @@ NativeWindowMac::NativeWindowMac(
|
||||||
}];
|
}];
|
||||||
|
|
||||||
InstallView();
|
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() {
|
NativeWindowMac::~NativeWindowMac() {
|
||||||
|
|
Loading…
Reference in a new issue