X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cc00f4f48b6c480648b87520cc006abf3cc2bf5..fec9cc08e7d94574af3f04b4c5fbafde63ac0b31:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 4af633107f..0211fa1a4a 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -38,7 +38,6 @@ #include "wx/mac/uma.h" #include "wx/mac/aga.h" -#include "wx/app.h" #include "wx/tooltip.h" #include "wx/dnd.h" @@ -123,9 +122,9 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event unsigned char charCode ; wxChar uniChar[2] ; - uniChar[0] = 0; - uniChar[1] = 0; - + uniChar[0] = 0; + uniChar[1] = 0; + UInt32 keyCode ; UInt32 modifiers ; Point point ; @@ -143,7 +142,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event if ( numChars * 2 > 4 ) charBuf = new UniChar[ numChars ] ; GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ; - charBuf[ numChars - 1 ] = 0; + charBuf[ numChars - 1 ] = 0; #if SIZEOF_WCHAR_T == 2 uniChar = charBuf[0] ; @@ -995,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; @@ -1004,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 @@ -1789,4 +1798,3 @@ static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 return 0; } -