diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2014-09-15 16:43:30 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-09-15 16:43:30 +0100 |
commit | acd8f8657013de63ca45294ded48ec531bc7fd64 (patch) | |
tree | 5715dc4e5577a176ea529f212e322ef689c5f688 | |
parent | e31d7d74005d3fa628ddb2fd0cca19ccc5109aec (diff) | |
download | clutter-acd8f8657013de63ca45294ded48ec531bc7fd64.tar.gz |
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.
-rw-r--r-- | 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 d29d03697..c6813dd5f 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); |