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. https://gitlab.gnome.org/GNOME/mutter/merge_requests/985
This commit is contained in:
parent
9075a5bf1e
commit
a8cb84c711
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user