mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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:
parent
2812338b7a
commit
0f6ab787ac
@ -683,7 +683,8 @@ meta_window_actor_paint (ClutterActor *actor)
|
|||||||
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
|
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
|
||||||
clip = cairo_region_create_rectangle (&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,
|
meta_shadow_paint (shadow,
|
||||||
@ -1351,7 +1352,8 @@ meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
|
|||||||
if (clip_shadow_under_window (self))
|
if (clip_shadow_under_window (self))
|
||||||
{
|
{
|
||||||
cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
|
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
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user