[clutter/clutter-1.20] actor: Default paint volume does not work without allocation



commit acd8f8657013de63ca45294ded48ec531bc7fd64
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Sep 15 16:43:30 2014 +0100

    actor: Default paint volume does not work without allocation
    
    We already check for needs_allocation before getting the default paint
    volume, but explicit is better than implicit.

 clutter/clutter-actor.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index d29d036..c6813dd 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -5969,6 +5969,12 @@ clutter_actor_update_default_paint_volume (ClutterActor       *self,
   ClutterActorPrivate *priv = self->priv;
   gboolean res = TRUE;
 
+  /* this should be checked before we call this function, but it's a
+   * good idea to be explicit when it costs us nothing
+   */
+  if (priv->needs_allocation)
+    return FALSE;
+
   /* we start from the allocation */
   clutter_paint_volume_set_width (volume,
                                   priv->allocation.x2 - priv->allocation.x1);


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