summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-11-04 16:46:53 +0100
committerAlexander Larsson <alexl@redhat.com>2013-11-04 16:50:48 +0100
commit481cf689488668012ca9d7a9c6b15b1dcd0cb465 (patch)
tree474a139f1b40cdf32ce8c31b6f46a952dd23b603 /eel
parentfb2eaaaa5c9b1472b77c83ae203aecb8e095b096 (diff)
downloadnautilus-481cf689488668012ca9d7a9c6b15b1dcd0cb465.tar.gz
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
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-canvas.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index c929727fc..0739ceb29 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);