Merge pull request #4682 from phamdaniel/ismaximized
Fix `isMaximized()` in window for when resizable is set to false on OSX
This commit is contained in:
commit
2a0be28111
1 changed files with 10 additions and 1 deletions
|
@ -573,7 +573,16 @@ void NativeWindowMac::Unmaximize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMaximized() {
|
bool NativeWindowMac::IsMaximized() {
|
||||||
return [window_ isZoomed];
|
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() {
|
void NativeWindowMac::Minimize() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue