[mutter] MetaWindowGroup: fix logic for handling translations



commit 0ab572d511b3c366ef7d8e33277befe1a44d1024
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Aug 15 13:28:34 2012 -0400

    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 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index fd7e0a7..4ba2118 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;
+
+          if (!actor_is_untransformed (CLUTTER_ACTOR (background_actor), &x, &y))
+            continue;
 
-          cairo_region_translate (visible_region, - group_x, - group_y);
+          cairo_region_translate (visible_region, - x, - y);
           meta_background_actor_set_visible_region (background_actor, visible_region);
+          cairo_region_translate (visible_region, x, y);
         }
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]