summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2009-03-02 15:45:53 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2009-03-02 15:45:53 +0000
commitd30ea97464a6a178fa4dbfb39c25678ae11d4b02 (patch)
treebefd260b63f2e4b5b58eedc08020dade5458d238
parentf4090b5c847293e94186e13144d8ac5ce0f9db4d (diff)
downloadgdk-pixbuf-d30ea97464a6a178fa4dbfb39c25678ae11d4b02.tar.gz
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
-rw-r--r--ChangeLog11
-rw-r--r--gtk/gtktextview.c14
2 files changed, 11 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 1287e765c..5b35ed42f 100644
--- a/ChangeLog
+++ b/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
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index da4f56273..97e143309 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -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.");