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:
@@ -665,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
|
|||||||
// 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 )
|
||||||
|
@@ -1846,11 +1846,14 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
// eventually test for transparent windows
|
// eventually test for transparent windows
|
||||||
if ( child->GetMacRootWindow() == window && child->IsShown() )
|
if ( child->GetMacRootWindow() == window && child->IsShown() )
|
||||||
|
{
|
||||||
|
if ( !child->IsKindOf( CLASSINFO( wxNotebook ) ) && !child->IsKindOf( CLASSINFO( wxTabCtrl ) ) )
|
||||||
{
|
{
|
||||||
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
||||||
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
|
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
DisposeRgn( childarea ) ;
|
DisposeRgn( childarea ) ;
|
||||||
|
|
||||||
if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() )
|
if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() )
|
||||||
|
@@ -665,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
|
|||||||
// 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 )
|
||||||
|
@@ -1846,11 +1846,14 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
// eventually test for transparent windows
|
// eventually test for transparent windows
|
||||||
if ( child->GetMacRootWindow() == window && child->IsShown() )
|
if ( child->GetMacRootWindow() == window && child->IsShown() )
|
||||||
|
{
|
||||||
|
if ( !child->IsKindOf( CLASSINFO( wxNotebook ) ) && !child->IsKindOf( CLASSINFO( wxTabCtrl ) ) )
|
||||||
{
|
{
|
||||||
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
||||||
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
|
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
DisposeRgn( childarea ) ;
|
DisposeRgn( childarea ) ;
|
||||||
|
|
||||||
if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() )
|
if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() )
|
||||||
|
Reference in New Issue
Block a user