[clutter/clutter-1.20] actor: Unallocated children do not contribute to the paint volume



commit 14da1c50270f1a3a8b2cb8c95d35e87bc9a31558
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Sep 15 16:50:33 2014 +0100

    actor: Unallocated children do not contribute to the paint volume
    
    Just like unmapped children.
    
    Apparently, layers above Clutter allow mapped children without an
    allocation, instead of unmapping them. This means we need to ignore
    them when computing the paint volume.
    
    Patch originally by: Adel Gadllah <adel gadllah gmail com>
    Signed-off by: Emmanuele Bassi <ebassi gnome org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736682

 clutter/clutter-actor.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index c6813dd..73dda5c 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -6027,7 +6027,13 @@ clutter_actor_update_default_paint_volume (ClutterActor       *self,
         {
           const ClutterPaintVolume *child_volume;
 
-          if (!CLUTTER_ACTOR_IS_MAPPED (child))
+          /* we ignore unmapped children, since they won't be painted.
+           *
+           * XXX: we also have to ignore mapped children without a valid
+           * allocation, because apparently some code above Clutter allows
+           * them.
+           */
+          if (!CLUTTER_ACTOR_IS_MAPPED (child) || !clutter_actor_has_allocation (child))
             continue;
 
           child_volume = clutter_actor_get_transformed_paint_volume (child, self);


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