[gtk+] text view: Don't leak cairo transforms



commit 6a1722f689eaec8d52e21a1252c9d70f8f5be4fa
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 21 23:39:16 2016 -0500

    text view: Don't leak cairo transforms
    
    The text view draw function was leaving its cairo context
    with a transformation after drawing to all the border windows,
    which lead mis-drawing in gitg. Avoid this by moving the
    gtk_cairo_transform_to_window call inside the existing
    cairo_save/restore calls.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760942

 gtk/gtktextview.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 659056c..c2d651b 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5914,9 +5914,8 @@ paint_border_window (GtkTextView     *text_view,
       w = gdk_window_get_width (window);
       h = gdk_window_get_height (window);
 
-      gtk_cairo_transform_to_window (cr, GTK_WIDGET (text_view), window);
-
       cairo_save (cr);
+      gtk_cairo_transform_to_window (cr, GTK_WIDGET (text_view), window);
       gtk_render_background (context, cr, 0, 0, w, h);
       cairo_restore (cr);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]