[gtk+] GtkStack: Fix double-draw in crossfade
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkStack: Fix double-draw in crossfade
- Date: Tue, 7 May 2013 14:44:38 +0000 (UTC)
commit e2c8a95af6d223df65b6dc62a85b696c5de1441b
Author: Alexander Larsson <alexl redhat com>
Date: Tue May 7 09:28:30 2013 +0200
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.
gtk/gtkstack.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 3d65265..e890610 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]