X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e8d3ba8e5b432f0ebe77785fa12a032001b5e23..b97e22c0ca7469762e422960245009648b0e0edf:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 5c1fbaddb1..13d4e27883 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -1,9 +1,10 @@ #include "wx/defs.h" +#include "wx/dc.h" #include "wx/mac/uma.h" #include "wx/mac/aga.h" #ifdef __UNIX__ - #include + #include #else #include #endif @@ -667,11 +668,11 @@ void UMAHideControl (ControlHandle theControl) { if ( UMAHasAppearance() ) { - ::HideControl( theControl ) ; + ::HideControl( theControl ) ; } else { - ::HideControl( theControl ) ; + ::HideControl( theControl ) ; } } @@ -834,6 +835,7 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow, } #endif SetPort( port ) ; + wxDC::MacInvalidateSetup() ; return err ; } @@ -1358,16 +1360,26 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) { // bool isHighlighted = IsWindowHighlited( inWindowRef ) ; // if ( inActivate != isHightlited ) - HiliteWindow( inWindowRef , inActivate ) ; - ControlHandle control = NULL ; - UMAGetRootControl( inWindowRef , & control ) ; - if ( control ) - { - if ( inActivate ) - UMAActivateControl( control ) ; - else - UMADeactivateControl( control ) ; - } + GrafPtr port ; + GetPort( &port ) ; +#if TARGET_CARBON + SetPort( GetWindowPort( inWindowRef ) ) ; +#else + SetPort( inWindowRef ) ; +#endif + SetOrigin( 0 , 0 ) ; + HiliteWindow( inWindowRef , inActivate ) ; + ControlHandle control = NULL ; + UMAGetRootControl( inWindowRef , & control ) ; + if ( control ) + { + if ( inActivate ) + UMAActivateControl( control ) ; + else + UMADeactivateControl( control ) ; + } + SetPort( port ) ; + wxDC::MacInvalidateSetup() ; } } OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )