From 0ab572d511b3c366ef7d8e33277befe1a44d1024 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 15 Aug 2012 13:28:34 -0400 Subject: [PATCH] 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 --- src/compositor/meta-window-group.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c index fd7e0a7a5..4ba211826 100644 --- a/src/compositor/meta-window-group.c +++ b/src/compositor/meta-window-group.c @@ -193,9 +193,14 @@ meta_window_group_paint (ClutterActor *actor) else if (META_IS_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); + cairo_region_translate (visible_region, x, y); } }