mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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.
This commit is contained in:
parent
26f4467392
commit
b1ccd262b1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user