From cd0870730fc7c522196c7c9e8f84dc86d8f5f8c7 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Sun, 5 Aug 2012 18:30:31 +0200 Subject: [PATCH] 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 file changed, 5 insertions(+) diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c index 4ec71f39a..fd7e0a7a5 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); } }