4355621aeb
There is a lot of duplication between ClutterGroup and ClutterBox so this makes the two files diff-able so that new fixes can easily be ported to both and bug fixes missing in one or the other can be spotted more easily. This doesn't change the behaviour of either actor; it's really just a shuffle around of code and normalizes the coding style to make the files comparable. This has already uncovered one bug in ClutterBox, and also highlights a bug in ClutterGroup + many other actors: 1) ClutterGroup::real_foreach was recently changed to use g_list_foreach instead of manually iterating the child list so it can safely handle calls like: clutter_container_foreach (container, clutter_actor_destroy); ClutterBox is still manually iterating the list. 2) In ClutterGroup we guard _queue_redraw() calls like this: if (CLUTTER_ACTOR_IS_VISIBLE (container)) clutter_actor_queue_redraw (CLUTTER_ACTOR (container)); In ClutterBox we don't: I think ClutterBox is correct here because clutter_actor_queue_redraw already optimizes the case where the actor's not visible, but it also considers that the actor may be cloned and so the guard in ClutterGroup could break clones. This actually highlights a wider clutter bug since the same kinds of guards can be found in all other clutter actors.