[mutter] MetaShapedTexture: fix critical warnings with fully obscured windows



commit b0ba325f0e9595afc3b4beceb531fad8b70ff5e1
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Jul 31 16:17:56 2014 +0200

    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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 4b752eb..5983faa 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]