🍎Fix 'isMaximized()' for non resizable windows
This commit is contained in:
parent
2bd167663d
commit
d5f5cdb45a
1 changed files with 10 additions and 1 deletions
|
@ -583,7 +583,16 @@ void NativeWindowMac::Unmaximize() {
|
|||
}
|
||||
|
||||
bool NativeWindowMac::IsMaximized() {
|
||||
if (([window_ styleMask] & NSResizableWindowMask) != 0) {
|
||||
return [window_ isZoomed];
|
||||
} else {
|
||||
NSRect rectScreen = [[NSScreen mainScreen] visibleFrame];
|
||||
NSRect rectWindow = [window_ frame];
|
||||
return (rectScreen.origin.x == rectWindow.origin.x &&
|
||||
rectScreen.origin.y == rectWindow.origin.y &&
|
||||
rectScreen.size.width == rectWindow.size.width &&
|
||||
rectScreen.size.height == rectWindow.size.height);
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::Minimize() {
|
||||
|
|
Loading…
Reference in a new issue