From 8a7acaab8419c86c4c85373426240b327e3465f1 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 6 Jun 2009 12:42:50 -0400 Subject: [PATCH] BigBox: Implement foreach_with_internals() We need a foreach_with_internals() function that includes the background_texture/background_rectangle actors, so that states will properly be updated on map/unmap/etc. http://bugzilla.gnome.org/show_bug.cgi?id=585007 --- src/big/box.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/big/box.c b/src/big/box.c index a2c216621..96c9ae5d1 100644 --- a/src/big/box.c +++ b/src/big/box.c @@ -290,6 +290,23 @@ big_box_real_foreach (ClutterContainer *container, } } +static void +big_box_real_foreach_with_internals (ClutterContainer *container, + ClutterCallback callback, + gpointer user_data) +{ + BigBox *group = BIG_BOX (container); + BigBoxPrivate *priv = group->priv; + + big_box_real_foreach (container, callback, user_data); + + if (priv->background_texture) + (* callback) (priv->background_texture, user_data); + + if (priv->background_rectangle) + (* callback) (priv->background_rectangle, user_data); +} + static void big_box_real_raise (ClutterContainer *container, ClutterActor *child, @@ -439,6 +456,7 @@ clutter_container_iface_init (ClutterContainerIface *iface) iface->add = big_box_real_add; iface->remove = big_box_real_remove; iface->foreach = big_box_real_foreach; + iface->foreach_with_internals = big_box_real_foreach_with_internals; iface->raise = big_box_real_raise; iface->lower = big_box_real_lower; iface->sort_depth_order = big_box_real_sort_depth_order;