X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/219665bbc6d9f344573502ca4505ed4807a7ed52..cbe067603829728da8852282e895f25b2bccf732:/src/osx/cocoa/nonownedwnd.mm diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index c2af82be5d..df2a894952 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -644,7 +644,19 @@ void wxNonOwnedWindowCocoaImpl::SetTitle( const wxString& title, wxFontEncoding bool wxNonOwnedWindowCocoaImpl::IsMaximized() const { - return [m_macWindow isZoomed]; + if (([m_macWindow styleMask] & NSResizableWindowMask) != 0) + { + return [m_macWindow isZoomed]; + } + else + { + NSRect rectScreen = [[NSScreen mainScreen] visibleFrame]; + NSRect rectWindow = [m_macWindow 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); + } } bool wxNonOwnedWindowCocoaImpl::IsIconized() const