Commit a8cb84c7 authored by Robert Mader's avatar Robert Mader Committed by Georges Basile Stavracas Neto

window-actor: Also cull out clip_region

From `meta_cullable_cull_out`:
```
Actors that may have fully opaque parts should also subtract out a region
that is fully opaque from @unobscured_region and @clip_region.
```

As we do no check for the intersection of these two elsewhere in the code,
let's substract from the clip region, too.

GNOME/mutter!985
parent 9075a5bf
......@@ -957,20 +957,28 @@ meta_window_actor_cull_out (MetaCullable *cullable,
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
if (unobscured_region && meta_window_actor_is_opaque (self))
if ((unobscured_region || clip_region) && meta_window_actor_is_opaque (self))
{
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
if (region)
{
cairo_region_subtract (unobscured_region, region);
if (unobscured_region)
cairo_region_subtract (unobscured_region, region);
if (clip_region)
cairo_region_subtract (clip_region, region);
}
else
{
cairo_rectangle_int_t rect;
meta_window_get_frame_rect (priv->window, &rect);
rect.x = rect.y = 0;
cairo_region_subtract_rectangle (unobscured_region, &rect);
if (unobscured_region)
cairo_region_subtract_rectangle (unobscured_region, &rect);
if (clip_region)
cairo_region_subtract_rectangle (clip_region, &rect);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment