mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
background-group: Use the Clutter iteration APIs
This commit is contained in:
parent
59cfbb07c8
commit
66fb86fd0c
@ -45,30 +45,27 @@ void
|
|||||||
meta_background_group_set_clip_region (MetaBackgroundGroup *self,
|
meta_background_group_set_clip_region (MetaBackgroundGroup *self,
|
||||||
cairo_region_t *region)
|
cairo_region_t *region)
|
||||||
{
|
{
|
||||||
GList *children, *l;
|
ClutterActor *child;
|
||||||
|
for (child = clutter_actor_get_first_child (self);
|
||||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
child != NULL;
|
||||||
for (l = children; l; l = l->next)
|
child = clutter_actor_get_next_sibling (child))
|
||||||
{
|
{
|
||||||
ClutterActor *actor = l->data;
|
if (META_IS_BACKGROUND_ACTOR (child))
|
||||||
|
|
||||||
if (META_IS_BACKGROUND_ACTOR (actor))
|
|
||||||
{
|
{
|
||||||
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;
|
int x, y;
|
||||||
|
|
||||||
if (!meta_actor_is_untransformed (actor, &x, &y))
|
if (!meta_actor_is_untransformed (child, &x, &y))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cairo_region_translate (region, -x, -y);
|
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);
|
cairo_region_translate (region, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_list_free (children);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
|
Loading…
Reference in New Issue
Block a user