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.
This commit is contained in:
Giovanni Campagna 2014-07-31 16:17:56 +02:00
parent 6fbd21001b
commit b0ba325f0e

View File

@ -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;