From 4f7170fd568a53133416a3e3f0361f5cdb956334 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 1 Nov 2013 01:51:27 -0400 Subject: [PATCH] stack: Fix the slide animation if the child has a non-zero allocation position This can happen if the child has a margin, for instance. --- gtk/gtkstack.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 5351eb3050..e7cc767cd0 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -1612,6 +1612,9 @@ gtk_stack_draw_slide (GtkWidget *widget, break; } + x += priv->last_visible_surface_allocation.x; + y += priv->last_visible_surface_allocation.y; + cairo_save (cr); cairo_set_source_surface (cr, priv->last_visible_surface, x, y); cairo_paint (cr);