From: Stefan Csomor Date: Thu, 25 May 2006 19:03:16 +0000 (+0000) Subject: using new method for implementing Maximize X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6643c354c5850da70a99af38f56ab08c296b7d64 using new method for implementing Maximize git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 38bee34358..0211fa1a4a 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -994,7 +994,7 @@ void wxTopLevelWindowMac::Maximize(bool maximize) wxMacPortStateHelper help( (GrafPtr)GetWindowPort( (WindowRef)m_macWindow) ) ; wxMacWindowClipper clip( this ); #endif - +#if 0 if ( !IsWindowInStandardState( (WindowRef)m_macWindow, NULL, NULL ) ) { Rect rect; @@ -1003,8 +1003,18 @@ void wxTopLevelWindowMac::Maximize(bool maximize) SetWindowIdealUserState((WindowRef)m_macWindow, &rect); SetWindowUserState((WindowRef)m_macWindow, &rect); } - ZoomWindow( (WindowRef)m_macWindow , maximize ? inZoomOut : inZoomIn , false ) ; +#else + Point idealSize = { 0 , 0 } ; + if ( maximize ) + { + Rect rect ; + GetAvailableWindowPositioningBounds(GetMainDevice(),&rect) ; + idealSize.h = rect.right - rect.left ; + idealSize.v = rect.bottom - rect.top ; + } + ZoomWindowIdeal( (WindowRef)m_macWindow , maximize ? inZoomOut : inZoomIn , &idealSize ) ; +#endif } bool wxTopLevelWindowMac::IsMaximized() const