X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/789ae0cfa2cefc10a3065a5e22c70f7180bbe15d..6270539bcf24f2ec32150a09f8aad383f5de0671:/src/mac/carbon/uma.cpp?ds=sidebyside diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 1de3eacf7f..8588e85260 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -14,9 +14,9 @@ #if wxUSE_GUI #include "wx/dc.h" -#include #ifndef __DARWIN__ +# include # include # if defined(TARGET_CARBON) # if PM_USE_SESSION_APIS @@ -33,6 +33,9 @@ #endif #include "wx/mac/uma.h" +#if TARGET_API_MAC_OSX +#include "wx/toplevel.h" +#endif // since we have decided that we only support 8.6 upwards we are // checking for these minimum requirements in the startup code of @@ -670,7 +673,7 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) if ( inWindowRef ) { // bool isHighlighted = IsWindowHighlited( inWindowRef ) ; -// if ( inActivate != isHightlited ) +// if ( inActivate != isHighlighted ) GrafPtr port ; GetPort( &port ) ; SetPortWindowPort( inWindowRef ) ; @@ -795,7 +798,7 @@ Rect* UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) WindowRef tlwref = GetControlOwner( theControl ) ; wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ; - if ( tlwwx->MacUsesCompositing() ) + if ( tlwwx != NULL && tlwwx->MacUsesCompositing() ) { ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ; HIPoint hiPoint = CGPointMake( 0 , 0 ) ;