Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream regions fix, claims to solve linuxmint/Cinnamon#698 #92

Merged
merged 4 commits into from Jun 1, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/compositor/meta-window-group.c
Expand Up @@ -105,18 +105,12 @@ static void
meta_window_group_paint (ClutterActor *actor)
{
cairo_region_t *visible_region;
cairo_region_t *unredirected_window_region = NULL;
ClutterActor *stage;
cairo_rectangle_int_t visible_rect, unredirected_rect;
cairo_rectangle_int_t visible_rect;
GList *children, *l;

MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
if (info->unredirected_window != NULL)
{
meta_window_actor_get_shape_bounds (META_WINDOW_ACTOR (info->unredirected_window), &unredirected_rect);
unredirected_window_region = cairo_region_create_rectangle (&unredirected_rect);
}

/* We walk the list from top to bottom (opposite of painting order),
* and subtract the opaque area of each window out of the visible
Expand All @@ -137,14 +131,22 @@ meta_window_group_paint (ClutterActor *actor)

visible_region = cairo_region_create_rectangle (&visible_rect);

if (unredirected_window_region)
cairo_region_subtract (visible_region, unredirected_window_region);
if (info->unredirected_window != NULL)
{
cairo_rectangle_int_t unredirected_rect;
MetaWindow *window = meta_window_actor_get_meta_window (info->unredirected_window);
meta_window_get_outer_rect (window, (MetaRectangle*) &unredirected_rect);
cairo_region_subtract_rectangle (visible_region, &unredirected_rect);
}

for (l = children; l; l = l->next)
{
if (!CLUTTER_ACTOR_IS_VISIBLE (l->data))
continue;

if (l->data == info->unredirected_window)
continue;

/* If an actor has effects applied, then that can change the area
* it paints and the opacity, so we no longer can figure out what
* portion of the actor is obscured and what portion of the screen
Expand Down Expand Up @@ -196,9 +198,6 @@ meta_window_group_paint (ClutterActor *actor)

cairo_region_destroy (visible_region);

if (unredirected_window_region)
cairo_region_destroy (unredirected_window_region);

CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);

/* Now that we are done painting, unset the visible regions (they will
Expand Down