[mutter] meta-window-actor: Fix paint_volume



commit 487602c409708310fe287dfdfdae17a961eafdd8
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Fri Feb 21 20:22:26 2014 +0100

    meta-window-actor: Fix paint_volume
    
    We cannot intersect the the complete volume with the unobscured bounds
    because it does not include the shadows. So just intersect it with the
    windows's shape bounds and union it with the shadow bounds.
    
    This also matches what the comment in the code says:
    "We could compute an full clip region as we do for the window texture,
    but the shadow is relatively cheap to draw, and a little more complex to clip,
    so we just catch the case where the shadow is completely obscured
    and doesn't need to be drawn at all."

 src/compositor/meta-window-actor.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 11606bb..cbd4df4 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -646,6 +646,9 @@ meta_window_actor_get_paint_volume (ClutterActor       *actor,
 
   meta_window_actor_get_shape_bounds (self, &bounds);
 
+  if (meta_shaped_texture_get_unobscured_bounds (META_SHAPED_TEXTURE (priv->actor), &unobscured_bounds))
+    gdk_rectangle_intersect (&bounds, &unobscured_bounds, &bounds);
+
   if (appears_focused ? priv->focused_shadow : priv->unfocused_shadow)
     {
       cairo_rectangle_int_t shadow_bounds;
@@ -661,9 +664,6 @@ meta_window_actor_get_paint_volume (ClutterActor       *actor,
       gdk_rectangle_union (&bounds, &shadow_bounds, &bounds);
     }
 
-  if (meta_shaped_texture_get_unobscured_bounds (META_SHAPED_TEXTURE (priv->actor), &unobscured_bounds))
-    gdk_rectangle_intersect (&bounds, &unobscured_bounds, &bounds);
-
   origin.x = bounds.x;
   origin.y = bounds.y;
   origin.z = 0.0f;


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