summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-05-07 09:28:30 +0200
committerAlexander Larsson <alexl@redhat.com>2013-05-07 09:28:30 +0200
commitc60395cfc96db6e236f18aa3cd6d702416a8c834 (patch)
tree730d24fe8ea1ece03b9b5393a6014acd97121c2d
parentcb2ba0abc09dea01a9d8d95440f079158d56368f (diff)
downloadgtk+-c60395cfc96db6e236f18aa3cd6d702416a8c834.tar.gz
GtkStack: Fix double-draw in crossfade
We should only draw the cross-fade on the bin window, not doing this was causing us to draw it multiple times using ADD which resulted in weird colors.
-rw-r--r--gtk/gtkstack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 3d65265802..e890610d43 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1437,7 +1437,8 @@ gtk_stack_draw (GtkWidget *widget,
GtkStackPrivate *priv = stack->priv;
cairo_t *pattern_cr;
- if (priv->visible_child)
+ if (priv->visible_child &&
+ gtk_cairo_should_draw_window (cr, priv->bin_window))
{
if (priv->transition_pos < 1.0)
{
@@ -1475,7 +1476,7 @@ gtk_stack_draw (GtkWidget *widget,
}
}
- else if (gtk_cairo_should_draw_window (cr, priv->bin_window))
+ else
gtk_container_propagate_draw (GTK_CONTAINER (stack),
priv->visible_child->widget,
cr);