[clutter/deprecate-default-stage: 8/11] cally/actor: Do not use the default stage as a fallback
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/deprecate-default-stage: 8/11] cally/actor: Do not use the default stage as a fallback
- Date: Thu, 10 Nov 2011 15:34:58 +0000 (UTC)
commit f235e70f3f0af0bd6310c5a278ef75bcc9f84a59
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Wed Nov 9 17:03:30 2011 +0000
cally/actor: Do not use the default stage as a fallback
Using the default stage as a fallback is wrong in all circumstances.
In this specific case, if an actor is not associated to a stage then it
cannot possibly be the key focus.
clutter/cally/cally-actor.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/clutter/cally/cally-actor.c b/clutter/cally/cally-actor.c
index b3bf24f..73b972f 100644
--- a/clutter/cally/cally-actor.c
+++ b/clutter/cally/cally-actor.c
@@ -551,14 +551,12 @@ cally_actor_ref_state_set (AtkObject *obj)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
stage = CLUTTER_STAGE (clutter_actor_get_stage (actor));
- /* If for any reason this actor doesn't have a stage
- associated, we try the default one as fallback */
- if (stage == NULL)
- stage = CLUTTER_STAGE (clutter_stage_get_default ());
-
- focus_actor = clutter_stage_get_key_focus (stage);
- if (focus_actor == actor)
- atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
+ if (stage != NULL)
+ {
+ focus_actor = clutter_stage_get_key_focus (stage);
+ if (focus_actor == actor)
+ atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
+ }
}
return state_set;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]