mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: isMaximized after minimize/fullscreen on macOS (#38308)
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:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user