From d665f50b8c387bfb809054f315e2d8dacb403575 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 14 May 2002 20:38:22 +0000 Subject: [PATCH 1/1] In an expose event, the m_clearRegion is also updated as well as m_updateRegion because otherwise in a scroll or resize, a custom OnEraseBackground method will draw over more window than OnPaint will redraw -- clearly not what's wanted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 5 ++++- src/gtk1/window.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index bad1ac7648..392a1095f5 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -509,6 +509,10 @@ static int gtk_window_expose_callback( GtkWidget *widget, gdk_event->area.y, gdk_event->area.width, gdk_event->area.height ); + win->m_clearRegion.Union( gdk_event->area.x, + gdk_event->area.y, + gdk_event->area.width, + gdk_event->area.height ); // Actual redrawing takes place in idle time. win->GtkUpdate(); @@ -4241,7 +4245,6 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) GetClientSize( &cw, &ch ); m_clearRegion.Intersect( 0, 0, cw, ch ); } - m_clipPaintRegion = TRUE; gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index bad1ac7648..392a1095f5 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -509,6 +509,10 @@ static int gtk_window_expose_callback( GtkWidget *widget, gdk_event->area.y, gdk_event->area.width, gdk_event->area.height ); + win->m_clearRegion.Union( gdk_event->area.x, + gdk_event->area.y, + gdk_event->area.width, + gdk_event->area.height ); // Actual redrawing takes place in idle time. win->GtkUpdate(); @@ -4241,7 +4245,6 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) GetClientSize( &cw, &ch ); m_clearRegion.Intersect( 0, 0, cw, ch ); } - m_clipPaintRegion = TRUE; gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); -- 2.45.2