If additional areas got invalidated, don't try to add them to the paint
* gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
invalidated, don't try to add them to the paint region: in an expose
handler, we cannot paint outside the area that was passed in, since
drawing will be clipped. So stealing the update region from the
window causes lost draws.
Patch by Owen Taylor
svn path=/trunk/; revision=22442
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2009-03-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 573688 – Don't steal update region in gtk_text_view_paint()
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
|
||||
invalidated, don't try to add them to the paint region: in an expose
|
||||
handler, we cannot paint outside the area that was passed in, since
|
||||
drawing will be clipped. So stealing the update region from the
|
||||
window causes lost draws.
|
||||
Patch by Owen Taylor
|
||||
|
||||
2009-03-02 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized
|
||||
|
||||
@@ -4531,7 +4531,6 @@ gtk_text_view_paint (GtkWidget *widget,
|
||||
GtkTextView *text_view;
|
||||
GList *child_exposes;
|
||||
GList *tmp_list;
|
||||
GdkRegion *updates;
|
||||
|
||||
text_view = GTK_TEXT_VIEW (widget);
|
||||
|
||||
@@ -4546,19 +4545,6 @@ gtk_text_view_paint (GtkWidget *widget,
|
||||
gtk_text_view_flush_first_validate (text_view);
|
||||
}
|
||||
|
||||
/* More regions could have become invalid in the above loop */
|
||||
updates = gdk_window_get_update_area (text_view->text_window->bin_window);
|
||||
if (updates)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
|
||||
gdk_region_get_clipbox (updates, &rect);
|
||||
|
||||
gdk_rectangle_union (area, &rect, area);
|
||||
|
||||
gdk_region_destroy (updates);
|
||||
}
|
||||
|
||||
if (!text_view->onscreen_validated)
|
||||
{
|
||||
g_warning (G_STRLOC ": somehow some text lines were modified or scrolling occurred since the last validation of lines on the screen - may be a text widget bug.");
|
||||
|
||||
Reference in New Issue
Block a user