[gtk+/wip/cssvalue: 105/141] stylecontext: Don't queue_resize() all the time
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssvalue: 105/141] stylecontext: Don't queue_resize() all the time
- Date: Sat, 7 Apr 2012 08:53:41 +0000 (UTC)
commit c627c71e976a03940977d5d7a388fb47fd3e8233
Author: Benjamin Otte <otte redhat com>
Date: Mon Apr 2 23:28:37 2012 +0200
stylecontext: Don't queue_resize() all the time
When a parent style context exists, there's no need to queue_resize() on
the widget, because the parent widget will call
gtk_style_context_validate() on us and _then_ we can call queue_resize()
if we have to.
gtk/gtkstylecontext.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 848ebe3..43f87c0 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1030,10 +1030,10 @@ gtk_style_context_set_invalid (GtkStyleContext *context,
if (invalid)
{
- if (priv->widget)
- gtk_widget_queue_resize (priv->widget);
if (priv->parent)
gtk_style_context_set_invalid (priv->parent, TRUE);
+ else if (priv->widget)
+ gtk_widget_queue_resize (priv->widget);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]