From d510a4b0cd500197d42968239d1f3dc896db889a Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 13 Nov 2008 11:37:35 +0000 Subject: [PATCH] * clutter/clutter-actor.c (clutter_actor_get_paint_visibility): Fix logic so that it won't return TRUE for a hidden stage. --- ChangeLog | 5 +++++ clutter/clutter-actor.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6108028e4..c806c65ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-13 Neil Roberts + + * clutter/clutter-actor.c (clutter_actor_get_paint_visibility): + Fix logic so that it won't return TRUE for a hidden stage. + 2008-11-13 Emmanuele Bassi * clutter/clutter-behaviour-ellipse.c: diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index ef09d0a04..ed6d59ba7 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -5698,13 +5698,17 @@ clutter_actor_get_paint_visibility (ClutterActor *actor) { g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE); - while (actor - && !(CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IS_TOPLEVEL) - && CLUTTER_ACTOR_IS_VISIBLE (actor)) - actor = clutter_actor_get_parent (actor); + do + { + if (!CLUTTER_ACTOR_IS_VISIBLE (actor)) + return FALSE; - return ((CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IS_TOPLEVEL) - ? TRUE : FALSE); + if (CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IS_TOPLEVEL) + return TRUE; + } + while ((actor = clutter_actor_get_parent (actor)) != NULL); + + return FALSE; } /**