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

fix: isMaximized after isMinimized on macOS

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2023-05-17 10:20:51 +02:00
committed by GitHub
parent 912e211f17
commit f33a5c727f
2 changed files with 41 additions and 0 deletions

View File

@@ -558,6 +558,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];