fix: isMaximized after minimize/fullscreen on macOS (#38291)

fix: isMaximized after isMinimized on macOS
This commit is contained in:
Shelley Vohr
2023-05-16 09:26:41 +02:00
committed by GitHub
parent e19500fa03
commit 042663e190
2 changed files with 41 additions and 0 deletions

View File

@@ -562,6 +562,11 @@ void NativeWindowMac::Unmaximize() {
}
bool NativeWindowMac::IsMaximized() {
// It's possible for [window_ isZoomed] to be true
// when the window is minimized or fullscreened.
if (IsMinimized() || IsFullscreen())
return false;
if (HasStyleMask(NSWindowStyleMaskResizable) != 0)
return [window_ isZoomed];