X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..0d1c8f39baaaeb7a7f757091209eab471ef5dbc4:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 38bee34358..7c57eeed86 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -24,9 +24,10 @@ #pragma hdrstop #endif +#include "wx/toplevel.h" + #ifndef WX_PRECOMP #include "wx/app.h" - #include "wx/toplevel.h" #include "wx/frame.h" #include "wx/string.h" #include "wx/log.h" @@ -994,7 +995,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 +1004,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