1
0
Fork 0

window-actor: Check frame bounds region before use

It may be NULL when the window goes unmanaged. This was unnoticed
as we barely enter the clip_shadow_under_window() check.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/698
This commit is contained in:
Carlos Garnacho 2019-01-27 18:51:10 +01:00
parent 2812338b7a
commit 0f6ab787ac

View file

@ -683,7 +683,8 @@ meta_window_actor_paint (ClutterActor *actor)
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
clip = cairo_region_create_rectangle (&bounds);
cairo_region_subtract (clip, frame_bounds);
if (frame_bounds)
cairo_region_subtract (clip, frame_bounds);
}
meta_shadow_paint (shadow,
@ -1351,7 +1352,8 @@ meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
if (clip_shadow_under_window (self))
{
cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
cairo_region_subtract (priv->shadow_clip, frame_bounds);
if (frame_bounds)
cairo_region_subtract (priv->shadow_clip, frame_bounds);
}
}
else