From b0ba325f0e9595afc3b4beceb531fad8b70ff5e1 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 31 Jul 2014 16:17:56 +0200 Subject: [PATCH] MetaShapedTexture: fix critical warnings with fully obscured windows If a window is fully obscured, it could have a negative paint volume width/height. Normalize that to 0x0. --- src/compositor/meta-shaped-texture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 4b752eb39..5983faa8d 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -514,6 +514,8 @@ meta_shaped_texture_get_paint_volume (ClutterActor *actor, box.y1 = MAX (unobscured_bounds.y, box.y1); box.y2 = MIN (unobscured_bounds.y + unobscured_bounds.height, box.y2); } + box.x2 = MAX (box.x2, box.x1); + box.y2 = MAX (box.y2, box.y1); clutter_paint_volume_union_box (volume, &box); return TRUE;