[mutter] window-group: Translate background's visible region as necessary



commit cd0870730fc7c522196c7c9e8f84dc86d8f5f8c7
Author: Tom Beckmann <tombeckmann online de>
Date:   Sun Aug 5 18:30:31 2012 +0200

    window-group: Translate background's visible region as necessary
    
    Currently when the window group is moved, the visible region set
    on the background actor no longer matches the actually visible
    region, resulting in flickering around window actors.
    Fix by translating the visible region with the window group.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681221

 src/compositor/meta-window-group.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index 4ec71f3..fd7e0a7 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -109,6 +109,7 @@ meta_window_group_paint (ClutterActor *actor)
   ClutterActor *stage;
   cairo_rectangle_int_t visible_rect, unredirected_rect;
   GList *children, *l;
+  gfloat group_x, group_y;
 
   MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
   MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
@@ -118,6 +119,8 @@ meta_window_group_paint (ClutterActor *actor)
       unredirected_window_region = cairo_region_create_rectangle (&unredirected_rect);
     }
 
+  clutter_actor_get_position (CLUTTER_ACTOR (window_group), &group_x, &group_y);
+
   /* We walk the list from top to bottom (opposite of painting order),
    * and subtract the opaque area of each window out of the visible
    * region that we pass to the windows below.
@@ -190,6 +193,8 @@ meta_window_group_paint (ClutterActor *actor)
       else if (META_IS_BACKGROUND_ACTOR (l->data))
         {
           MetaBackgroundActor *background_actor = l->data;
+
+          cairo_region_translate (visible_region, - group_x, - group_y);
           meta_background_actor_set_visible_region (background_actor, visible_region);
         }
     }



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