[mutter/wayland] background-group: Use the Clutter iteration APIs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] background-group: Use the Clutter iteration APIs
- Date: Thu, 21 Nov 2013 19:25:04 +0000 (UTC)
commit 5af7f619c8040d00298329eda86a0e36c9432973
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Nov 18 22:16:52 2013 -0500
background-group: Use the Clutter iteration APIs
src/compositor/meta-background-group.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/src/compositor/meta-background-group.c b/src/compositor/meta-background-group.c
index 1dae14f..3d680de 100644
--- a/src/compositor/meta-background-group.c
+++ b/src/compositor/meta-background-group.c
@@ -45,30 +45,27 @@ void
meta_background_group_set_clip_region (MetaBackgroundGroup *self,
cairo_region_t *region)
{
- GList *children, *l;
-
- children = clutter_actor_get_children (CLUTTER_ACTOR (self));
- for (l = children; l; l = l->next)
+ ClutterActor *child;
+ for (child = clutter_actor_get_first_child (self);
+ child != NULL;
+ child = clutter_actor_get_next_sibling (child))
{
- ClutterActor *actor = l->data;
-
- if (META_IS_BACKGROUND_ACTOR (actor))
+ if (META_IS_BACKGROUND_ACTOR (child))
{
- meta_background_actor_set_clip_region (META_BACKGROUND_ACTOR (actor), region);
+ meta_background_actor_set_clip_region (META_BACKGROUND_ACTOR (child), region);
}
- else if (META_IS_BACKGROUND_GROUP (actor))
+ else if (META_IS_BACKGROUND_GROUP (child))
{
int x, y;
- if (!meta_actor_is_untransformed (actor, &x, &y))
+ if (!meta_actor_is_untransformed (child, &x, &y))
continue;
cairo_region_translate (region, -x, -y);
- meta_background_group_set_clip_region (META_BACKGROUND_GROUP (actor), region);
+ meta_background_group_set_clip_region (META_BACKGROUND_GROUP (child), region);
cairo_region_translate (region, x, y);
}
}
- g_list_free (children);
}
ClutterActor *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]