workaround for notebook/tabctrl redraw bug, it is now not excluded from the local eraseRgn of the parent window, thus guaranteeing that the background is always correct

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2001-05-16 12:46:51 +00:00
parent ca715d8835
commit 27419164ad
4 changed files with 16 additions and 8 deletions

View File

@@ -664,8 +664,9 @@ void wxControl::OnPaint(wxPaintEvent& event)
wxMacDrawingHelper help( win ) ; wxMacDrawingHelper help( win ) ;
// the mac control manager always assumes to have the origin at 0,0 // the mac control manager always assumes to have the origin at 0,0
SetOrigin( 0 , 0 ) ; SetOrigin( 0 , 0 ) ;
bool hasTabBehind = false ; bool hasTabBehind = false ;
wxWindow* parent = GetParent() ; wxWindow* parent = GetParent() ;
while ( parent ) while ( parent )
{ {
@@ -684,7 +685,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
parent = parent->GetParent() ; parent = parent->GetParent() ;
} }
UMADrawControl( m_macControl ) ; UMADrawControl( m_macControl ) ;
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
} }

View File

@@ -1847,8 +1847,11 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
// eventually test for transparent windows // eventually test for transparent windows
if ( child->GetMacRootWindow() == window && child->IsShown() ) if ( child->GetMacRootWindow() == window && child->IsShown() )
{ {
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; if ( !child->IsKindOf( CLASSINFO( wxNotebook ) ) && !child->IsKindOf( CLASSINFO( wxTabCtrl ) ) )
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; {
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
}
} }
} }
DisposeRgn( childarea ) ; DisposeRgn( childarea ) ;

View File

@@ -664,8 +664,9 @@ void wxControl::OnPaint(wxPaintEvent& event)
wxMacDrawingHelper help( win ) ; wxMacDrawingHelper help( win ) ;
// the mac control manager always assumes to have the origin at 0,0 // the mac control manager always assumes to have the origin at 0,0
SetOrigin( 0 , 0 ) ; SetOrigin( 0 , 0 ) ;
bool hasTabBehind = false ; bool hasTabBehind = false ;
wxWindow* parent = GetParent() ; wxWindow* parent = GetParent() ;
while ( parent ) while ( parent )
{ {
@@ -684,7 +685,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
parent = parent->GetParent() ; parent = parent->GetParent() ;
} }
UMADrawControl( m_macControl ) ; UMADrawControl( m_macControl ) ;
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
} }

View File

@@ -1847,8 +1847,11 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
// eventually test for transparent windows // eventually test for transparent windows
if ( child->GetMacRootWindow() == window && child->IsShown() ) if ( child->GetMacRootWindow() == window && child->IsShown() )
{ {
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; if ( !child->IsKindOf( CLASSINFO( wxNotebook ) ) && !child->IsKindOf( CLASSINFO( wxTabCtrl ) ) )
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; {
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
}
} }
} }
DisposeRgn( childarea ) ; DisposeRgn( childarea ) ;