-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- ::DeactivateControl( inControl ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- AGADeactivateControl( inControl ) ;
- }
-#else
- {
- }
-#endif
-}
-
-void UMASetThemeWindowBackground (WindowRef inWindow,
- ThemeBrush inBrush,
- Boolean inUpdate)
+ if ( UMAHasAppearance() )
+ {
+ if ( UMAIsControlActive( inControl ) )
+ {
+ bool visible = IsControlVisible( inControl ) ;
+ if ( visible )
+ SetControlVisibility( inControl , false , false ) ;
+ ::DeactivateControl( inControl ) ;
+ if ( visible ) {
+ SetControlVisibility( inControl , true , false ) ;
+ InvalWindowRect(GetControlOwner(inControl),&(**inControl).contrlRect ) ;
+ }
+ }
+ }
+}
+
+void UMASetThemeWindowBackground (WindowRef inWindow,
+ ThemeBrush inBrush,
+ Boolean inUpdate)