diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-23 16:08:52 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-24 12:03:37 +0000 |
commit | c867e9d941c08b3ef8de722784a4d013ef92bb59 (patch) | |
tree | 0d6073c24e4b2eefb2b6c4543b110b115883f8ea | |
parent | 6240b1a228597d7068aae41d48ef4437f6450347 (diff) | |
download | clutter-c867e9d941c08b3ef8de722784a4d013ef92bb59.tar.gz |
actor: Expand is_in_clone_paint() check
The function should return true not only if the actor is being painted
by a ClutterClone, but also if it's inside a sub-graph being painted by
a ClutterClone.
https://bugzilla.gnome.org/show_bug.cgi?id=756371
-rw-r--r-- | clutter/clutter-actor.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 6298b1c74..d966e40c6 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -16376,9 +16376,29 @@ _clutter_actor_set_in_clone_paint (ClutterActor *self, gboolean clutter_actor_is_in_clone_paint (ClutterActor *self) { + ClutterActor *parent; + g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE); - return self->priv->in_clone_paint; + if (self->priv->in_clone_paint) + return TRUE; + + if (self->priv->in_cloned_branch == 0) + return FALSE; + + parent = self->priv->parent; + while (parent != NULL) + { + if (parent->priv->in_cloned_branch == 0) + break; + + if (parent->priv->in_clone_paint) + return TRUE; + + parent = parent->priv->parent; + } + + return FALSE; } static gboolean |