[clutter/clutter-1.22] actor: Queue a relayout if we use the content's preferred size



commit 4f03b32eea3cb7221eeaaf0d18e3c31cee23dda1
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Dec 15 23:39:05 2014 +0000

    actor: Queue a relayout if we use the content's preferred size
    
    In case the ClutterContent changes, and the actor uses the content's
    preferred size to drive its own.

 clutter/clutter-actor.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index c805c52..322ba70 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -19592,9 +19592,12 @@ clutter_actor_set_content (ClutterActor   *self,
       _clutter_content_attached (priv->content, self);
     }
 
-  /* given that the content is always painted within the allocation,
-   * we only need to queue a redraw here
+  /* if the actor's preferred size is the content's preferred size,
+   * then we need to conditionally queue a relayout here...
    */
+  if (priv->request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
+    _clutter_actor_queue_only_relayout (self);
+
   clutter_actor_queue_redraw (self);
 
   g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CONTENT]);


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