[gtk+] stylecontext: Don't queue a resize when none is needed



commit b6594d1ac9b304b01f9934a50e72fa52b99a7de5
Author: Benjamin Otte <otte redhat com>
Date:   Mon Apr 9 21:15:22 2012 +0200

    stylecontext: Don't queue a resize when none is needed

 gtk/gtkstylecontext.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index de37c06..0ac8eb3 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -23,6 +23,7 @@
 #include <gobject/gvaluecollector.h>
 
 #include "gtkstylecontextprivate.h"
+#include "gtkcontainerprivate.h"
 #include "gtkcssenginevalueprivate.h"
 #include "gtkcssrgbavalueprivate.h"
 #include "gtkstylepropertiesprivate.h"
@@ -874,8 +875,8 @@ gtk_style_context_set_invalid (GtkStyleContext *context,
     {
       if (priv->parent)
         gtk_style_context_set_invalid (priv->parent, TRUE);
-      else if (priv->widget)
-        gtk_widget_queue_resize (priv->widget);
+      else if (GTK_IS_RESIZE_CONTAINER (priv->widget))
+        _gtk_container_queue_resize_handler (GTK_CONTAINER (priv->widget));
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]