From 27419164adafee9829f56d617f9f69954878586a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 16 May 2001 12:46:51 +0000 Subject: [PATCH] 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 --- src/mac/carbon/control.cpp | 5 +++-- src/mac/carbon/window.cpp | 7 +++++-- src/mac/control.cpp | 5 +++-- src/mac/window.cpp | 7 +++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index df3790521a..8268b03c8b 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -664,8 +664,9 @@ void wxControl::OnPaint(wxPaintEvent& event) wxMacDrawingHelper help( win ) ; // the mac control manager always assumes to have the origin at 0,0 SetOrigin( 0 , 0 ) ; + - bool hasTabBehind = false ; + bool hasTabBehind = false ; wxWindow* parent = GetParent() ; while ( parent ) { @@ -684,7 +685,7 @@ void wxControl::OnPaint(wxPaintEvent& event) parent = parent->GetParent() ; } - + UMADrawControl( m_macControl ) ; UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 7acae31b6c..644bf7e737 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1847,8 +1847,11 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time) // eventually test for transparent windows 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 ) ; - DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; + 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 ) ; + DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; + } } } DisposeRgn( childarea ) ; diff --git a/src/mac/control.cpp b/src/mac/control.cpp index df3790521a..8268b03c8b 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -664,8 +664,9 @@ void wxControl::OnPaint(wxPaintEvent& event) wxMacDrawingHelper help( win ) ; // the mac control manager always assumes to have the origin at 0,0 SetOrigin( 0 , 0 ) ; + - bool hasTabBehind = false ; + bool hasTabBehind = false ; wxWindow* parent = GetParent() ; while ( parent ) { @@ -684,7 +685,7 @@ void wxControl::OnPaint(wxPaintEvent& event) parent = parent->GetParent() ; } - + UMADrawControl( m_macControl ) ; UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ; } diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 7acae31b6c..644bf7e737 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -1847,8 +1847,11 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time) // eventually test for transparent windows 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 ) ; - DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; + 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 ) ; + DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ; + } } } DisposeRgn( childarea ) ; -- 2.49.0