[gtk+] gtkbox: remove unnecessary queue_compute_expand()



commit 4556d0f0fe969e8f2144602696b4580b9718b71e
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Jul 26 13:09:21 2016 +0200

    gtkbox: remove unnecessary queue_compute_expand()
    
    The expand child property does not have any effect on the
    expand state of the GtkBox, so queuing a compute_expand
    when changing it is not needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769162

 gtk/gtkbox.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 93206cf..e39eb49 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -2540,17 +2540,11 @@ gtk_box_set_child_packing (GtkBox      *box,
   gtk_widget_freeze_child_notify (child);
   if (list)
     {
-      gboolean expanded;
+      expand = expand != FALSE;
 
-      expanded = expand != FALSE;
-
-      /* avoid setting expand if unchanged, since queue_compute_expand
-       * can be expensive-ish
-       */
-      if (child_info->expand != expanded)
+      if (child_info->expand != expand)
         {
-          child_info->expand = expand != FALSE;
-          gtk_widget_queue_compute_expand (GTK_WIDGET (box));
+          child_info->expand = expand;
           gtk_container_child_notify_by_pspec (GTK_CONTAINER (box), child, child_props[CHILD_PROP_EXPAND]);
         }
 


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