+void wxControl::MacRedrawControl()
+{
+ if ( m_macControl )
+ {
+ WindowRef window = GetMacRootWindow() ;
+ if ( window )
+ {
+ wxWindow* win = wxFindWinFromMacWindow( window ) ;
+ if ( win )
+ {
+ wxMacDrawingHelper help( win ) ;
+ // the mac control manager always assumes to have the origin at 0,0
+ SetOrigin( 0 , 0 ) ;
+
+ bool hasTabBehind = false ;
+ wxWindow* parent = GetParent() ;
+ while ( parent )
+ {
+ if( parent->MacGetWindowData() )
+ {
+ UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ;
+ break ;
+ }
+
+ if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
+ {
+ if ( ((wxControl*)parent)->m_macControl )
+ SetUpControlBackground( ((wxControl*)parent)->m_macControl , -1 , true ) ;
+ break ;
+ }
+
+ parent = parent->GetParent() ;
+ }
+
+ UMADrawControl( m_macControl ) ;
+ UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+ }
+ }
+ }
+}
+