[gtk+] GtkStack: Fix drawing of sliding
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkStack: Fix drawing of sliding
- Date: Thu, 13 Jun 2013 18:42:16 +0000 (UTC)
commit 418ac673a3b78ecdb5ac3cfee693a4f95da06db0
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 13 20:50:41 2013 +0200
GtkStack: Fix drawing of sliding
We were not drawing the view window, so the old widget
was clipped for the sliding transitions.
gtk/gtkstack.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index fcaa0b2..47a637d 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1449,7 +1449,9 @@ gtk_stack_draw_slide (GtkWidget *widget,
if (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN)
y += allocation.height;
- if (priv->last_visible_surface)
+ if (priv->last_visible_surface &&
+ gtk_cairo_should_draw_window (cr, priv->view_window))
+
{
cairo_save (cr);
cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
@@ -1457,9 +1459,10 @@ gtk_stack_draw_slide (GtkWidget *widget,
cairo_restore (cr);
}
- gtk_container_propagate_draw (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- cr);
+ if (gtk_cairo_should_draw_window (cr, priv->bin_window))
+ gtk_container_propagate_draw (GTK_CONTAINER (stack),
+ priv->visible_child->widget,
+ cr);
}
static gboolean
@@ -1470,8 +1473,7 @@ gtk_stack_draw (GtkWidget *widget,
GtkStackPrivate *priv = stack->priv;
cairo_t *pattern_cr;
- if (priv->visible_child &&
- gtk_cairo_should_draw_window (cr, priv->bin_window))
+ if (priv->visible_child)
{
if (priv->transition_pos < 1.0)
{
@@ -1496,7 +1498,8 @@ gtk_stack_draw (GtkWidget *widget,
switch (priv->active_transition_type)
{
case GTK_STACK_TRANSITION_TYPE_CROSSFADE:
- gtk_stack_draw_crossfade (widget, cr);
+ if (gtk_cairo_should_draw_window (cr, priv->bin_window))
+ gtk_stack_draw_crossfade (widget, cr);
break;
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT:
case GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT:
@@ -1509,7 +1512,7 @@ gtk_stack_draw (GtkWidget *widget,
}
}
- else
+ else if (gtk_cairo_should_draw_window (cr, priv->bin_window))
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]