[libgd] GdStack: Avoid queue_resize in some cases
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] GdStack: Avoid queue_resize in some cases
- Date: Fri, 15 Feb 2013 15:12:44 +0000 (UTC)
commit 20a4046331161a6c02516e9a6bb902ce83af0308
Author: Alexander Larsson <alexl redhat com>
Date: Fri Feb 15 13:45:14 2013 +0100
GdStack: Avoid queue_resize in some cases
libgd/gd-stack.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libgd/gd-stack.c b/libgd/gd-stack.c
index 9206cc5..f533058 100644
--- a/libgd/gd-stack.c
+++ b/libgd/gd-stack.c
@@ -488,7 +488,10 @@ set_visible_child (GdStack *stack,
priv->xfade_surface = surface;
- gtk_widget_queue_resize (GTK_WIDGET (stack));
+ if (priv->homogeneous)
+ gtk_widget_queue_draw (GTK_WIDGET (stack));
+ else
+ gtk_widget_queue_resize (GTK_WIDGET (stack));
g_object_notify (G_OBJECT (stack), "visible-child");
g_object_notify (G_OBJECT (stack), "visible-child-name");
@@ -603,7 +606,8 @@ gd_stack_set_homogeneous (GdStack *stack,
priv->homogeneous = homogeneous;
- gtk_widget_queue_resize (GTK_WIDGET (stack));
+ if (gtk_widget_get_visible (GTK_WIDGET(stack)))
+ gtk_widget_queue_resize (GTK_WIDGET (stack));
g_object_notify (G_OBJECT (stack), "homogeneous");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]