Browse Source

fix: use `HasStyleMask(NSWindowStyleMaskResizable)` instead of `IsResizable()` for enabling/disabling window maximize button (#41027)

* fix: use `HasStyleMask(NSWindowStyleMaskResizable)` instead of `IsResizable()` for enabling/disabling window maximize button

Co-authored-by: Tamás Zahola <[email protected]>

* Format

Co-authored-by: Tamás Zahola <[email protected]>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Tamás Zahola <[email protected]>
trop[bot] 1 year ago
parent
commit
08ce63f8a5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      shell/browser/native_window_mac.mm

+ 2 - 1
shell/browser/native_window_mac.mm

@@ -900,7 +900,8 @@ bool NativeWindowMac::IsMaximizable() {
 
 void NativeWindowMac::UpdateZoomButton() {
   [[window_ standardWindowButton:NSWindowZoomButton]
-      setEnabled:IsResizable() && (CanMaximize() || IsFullScreenable())];
+      setEnabled:HasStyleMask(NSWindowStyleMaskResizable) &&
+                 (CanMaximize() || IsFullScreenable())];
 }
 
 void NativeWindowMac::SetFullScreenable(bool fullscreenable) {