mirror of
https://github.com/brl/mutter.git
synced 2024-12-01 20:30:41 -05:00
MetaBackgroundGroup: don't use clutter_actor_get_children()
In C code we can use ClutterActorIter and avoid allocating a GList.
This commit is contained in:
parent
c3e8646af3
commit
3093b5c95d
@ -73,13 +73,12 @@ void
|
|||||||
meta_background_group_set_visible_region (MetaBackgroundGroup *self,
|
meta_background_group_set_visible_region (MetaBackgroundGroup *self,
|
||||||
cairo_region_t *region)
|
cairo_region_t *region)
|
||||||
{
|
{
|
||||||
GList *children, *l;
|
ClutterActorIter iter;
|
||||||
|
ClutterActor *actor;
|
||||||
|
|
||||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (self));
|
||||||
for (l = children; l; l = l->next)
|
while (clutter_actor_iter_next (&iter, &actor))
|
||||||
{
|
{
|
||||||
ClutterActor *actor = l->data;
|
|
||||||
|
|
||||||
if (META_IS_BACKGROUND_ACTOR (actor))
|
if (META_IS_BACKGROUND_ACTOR (actor))
|
||||||
{
|
{
|
||||||
meta_background_actor_set_visible_region (META_BACKGROUND_ACTOR (actor), region);
|
meta_background_actor_set_visible_region (META_BACKGROUND_ACTOR (actor), region);
|
||||||
@ -96,7 +95,6 @@ meta_background_group_set_visible_region (MetaBackgroundGroup *self,
|
|||||||
cairo_region_translate (region, x, y);
|
cairo_region_translate (region, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_list_free (children);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
|
Loading…
Reference in New Issue
Block a user