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
This commit is contained in:
Julian Smart 2002-05-14 20:38:22 +00:00
parent 63ec9dbbac
commit d665f50b8c
2 changed files with 8 additions and 2 deletions

View 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 );

View 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 );