[nautilus] Fix rename entry position



commit 481cf689488668012ca9d7a9c6b15b1dcd0cb465
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Nov 4 16:46:53 2013 +0100

    Fix rename entry position
    
    We need to not modify the cairo_t when we propagate up to the parent class
    as this affects where GtkLayout draws the child widgets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705464

 eel/eel-canvas.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index c929727..0739ceb 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -2834,11 +2834,19 @@ eel_canvas_draw (GtkWidget *widget, cairo_t *cr)
                 return FALSE;
 
         bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
+
+       if (!gtk_cairo_should_draw_window (cr, bin_window))
+               return FALSE;
+
+       cairo_save (cr);
+
         gtk_cairo_transform_to_window (cr, widget, bin_window);
 
         region = eel_cairo_get_clip_region (cr);
-        if (region == NULL)
+        if (region == NULL) {
+               cairo_restore (cr);
                 return FALSE;
+       }
 
 #ifdef VERBOSE
        g_print ("Draw\n");
@@ -2870,6 +2878,8 @@ eel_canvas_draw (GtkWidget *widget, cairo_t *cr)
        if (canvas->root->flags & EEL_CANVAS_ITEM_MAPPED)
                EEL_CANVAS_ITEM_GET_CLASS (canvas->root)->draw (canvas->root, cr, region);
 
+       cairo_restore (cr);
+
        /* Chain up to get exposes on child widgets */
         if (GTK_WIDGET_CLASS (canvas_parent_class)->draw)
                 GTK_WIDGET_CLASS (canvas_parent_class)->draw (widget, cr);


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