mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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
This commit is contained in:
parent
d6be75ae99
commit
cd0870730f
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user