MetaWindowGroup: fix logic for handling translations

Instead of getting the x/y of the MetaBackgroundActor with respect to the
parent, use the same logic that we do for windows, fixing the case
where there is a more complex transformation involved.

https://bugzilla.gnome.org/show_bug.cgi?id=681221
This commit is contained in:
Owen W. Taylor 2012-08-15 13:28:34 -04:00
parent 1c8d45e89c
commit 0ab572d511

View File

@ -193,9 +193,14 @@ meta_window_group_paint (ClutterActor *actor)
else if (META_IS_BACKGROUND_ACTOR (l->data)) else if (META_IS_BACKGROUND_ACTOR (l->data))
{ {
MetaBackgroundActor *background_actor = l->data; MetaBackgroundActor *background_actor = l->data;
int x, y;
cairo_region_translate (visible_region, - group_x, - group_y); if (!actor_is_untransformed (CLUTTER_ACTOR (background_actor), &x, &y))
continue;
cairo_region_translate (visible_region, - x, - y);
meta_background_actor_set_visible_region (background_actor, visible_region); meta_background_actor_set_visible_region (background_actor, visible_region);
cairo_region_translate (visible_region, x, y);
} }
} }