clutter/actor: Deduplicate child destruction loop

It's identical in clutter_actor_real_destroy and
clutter_actor_destroy_all_children, other than the latter having
some extra error checking.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2074>
This commit is contained in:
Daniel van Vugt 2021-11-03 16:24:06 +08:00
parent 82fd5cbdbd
commit 4a70a73e42

View File

@ -5904,15 +5904,7 @@ clutter_actor_real_calculate_resource_scale (ClutterActor *self,
static void
clutter_actor_real_destroy (ClutterActor *actor)
{
ClutterActorIter iter;
g_object_freeze_notify (G_OBJECT (actor));
clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, NULL))
clutter_actor_iter_destroy (&iter);
g_object_thaw_notify (G_OBJECT (actor));
clutter_actor_destroy_all_children (actor);
}
static GObject *