window-group: Subtract the unredirected window in stage space

meta_window_group_paint tries to carefully figure out which parts of the
scene it can avoid painting. One area it avoids painting is the region of
the screen occupied by an unredirected window (if there's one present).
When subtracting from the visible region, it gets the coordinate spaces
confused, and ends up subtracting the area at the wrong offset. Fix this
by translating the rectangle subtracted from the visible region.

https://bugzilla.gnome.org/show_bug.cgi?id=677116
This commit is contained in:
Jasper St. Pierre 2012-08-29 14:50:31 -03:00
parent fbcddbcf3e
commit bc96a14185

View File

@ -236,8 +236,11 @@ meta_window_group_paint (ClutterActor *actor)
if (info->unredirected_window != NULL) if (info->unredirected_window != NULL)
{ {
int x, y;
cairo_rectangle_int_t unredirected_rect; cairo_rectangle_int_t unredirected_rect;
meta_window_actor_get_shape_bounds (META_WINDOW_ACTOR (info->unredirected_window), &unredirected_rect); MetaWindow *window = meta_window_actor_get_meta_window (info->unredirected_window);
meta_window_get_outer_rect (window, &unredirected_rect);
cairo_region_subtract_rectangle (visible_region, &unredirected_rect); cairo_region_subtract_rectangle (visible_region, &unredirected_rect);
} }