[gtk+/wip/cosimoc/range-gadget] widget: make sure to check all children for allocation needs



commit fb198e324c7fd833dbee43cf7384851cfaa7be3a
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Feb 28 10:58:06 2016 -0800

    widget: make sure to check all children for allocation needs
    
    GtkWidget uses gtk_container_foreach() to iterate over children and
    check whether they need their allocation reset.
    However, that leaves out internal children, such as scrollbars of a
    GtkScrolledWindow. Use gtk_container_forall() instead.

 gtk/gtkwidget.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 16a1855..cefa054 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -16256,9 +16256,9 @@ gtk_widget_ensure_allocate (GtkWidget *widget)
       priv->alloc_needed_on_child = FALSE;
 
       if (GTK_IS_CONTAINER (widget))
-        gtk_container_foreach (GTK_CONTAINER (widget),
-                               (GtkCallback) gtk_widget_ensure_allocate,
-                               NULL);
+        gtk_container_forall (GTK_CONTAINER (widget),
+                              (GtkCallback) gtk_widget_ensure_allocate,
+                              NULL);
     }
 }
 


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