[mutter/wip/carlosg/clip-me-harder: 2/5] compositor: Check frame bounds region before use
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/clip-me-harder: 2/5] compositor: Check frame bounds region before use
- Date: Mon, 28 Jan 2019 12:22:58 +0000 (UTC)
commit 8120a7b7fcbca7c11b02c40b3bfaf86d78b8937b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 27 18:51:10 2019 +0100
compositor: 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.
src/compositor/meta-window-actor.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 20a22062f..ebfe94c22 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -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,
@@ -1322,7 +1323,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]