]> git.saurik.com Git - wxWidgets.git/commitdiff
In an expose event, the m_clearRegion is also updated as well
authorJulian Smart <julian@anthemion.co.uk>
Tue, 14 May 2002 20:38:22 +0000 (20:38 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 14 May 2002 20:38:22 +0000 (20:38 +0000)
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
src/gtk1/window.cpp

index bad1ac7648dc2979e3853ff25e6360699017729e..392a1095f5195ed420bcb4f33ccd81f0f87f1e34 100644 (file)
@@ -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 );
index bad1ac7648dc2979e3853ff25e6360699017729e..392a1095f5195ed420bcb4f33ccd81f0f87f1e34 100644 (file)
@@ -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 );