mac: SetResizable fix
This commit is contained in:
parent
3182504969
commit
85991d312a
1 changed files with 5 additions and 1 deletions
|
@ -649,13 +649,17 @@ void NativeWindowMac::SetContentSizeConstraints(
|
|||
}
|
||||
|
||||
void NativeWindowMac::SetResizable(bool resizable) {
|
||||
bool maximizable = IsMaximizable();
|
||||
// Change styleMask for frameless causes the window to change size, so we have
|
||||
// to explicitly disables that.
|
||||
ScopedDisableResize disable_resize;
|
||||
if (resizable) {
|
||||
[window_ setStyleMask:[window_ styleMask] | NSResizableWindowMask];
|
||||
} else {
|
||||
[[window_ standardWindowButton:NSWindowZoomButton] setEnabled:NO];
|
||||
[window_ setStyleMask:[window_ styleMask] & (~NSResizableWindowMask)];
|
||||
}
|
||||
if (!maximizable) {
|
||||
SetMaximizable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue