[clutter] actor: Expand is_in_clone_paint() check
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] actor: Expand is_in_clone_paint() check
- Date: Wed, 24 Feb 2016 12:03:46 +0000 (UTC)
commit c867e9d941c08b3ef8de722784a4d013ef92bb59
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Feb 23 16:08:52 2016 +0000
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
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 6298b1c..d966e40 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]