🍎Fix 'isMaximized()' for non resizable windows

This commit is contained in:
Daniel Pham 2016-03-05 01:39:13 -05:00
parent 2bd167663d
commit d5f5cdb45a

View file

@ -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() {