St: don't focus hidden actors

If an actors is not mapped (visible and all parents visible), then don't
allow navigating focus to it.
This fixes a regression in the keyboard navigation of the panel with
invisibile items.

https://bugzilla.gnome.org/show_bug.cgi?id=683529
This commit is contained in:
Giovanni Campagna
2012-09-06 22:12:44 +02:00
parent 452ac297ab
commit 09e3aed770
4 changed files with 32 additions and 20 deletions

View File

@ -155,8 +155,15 @@ shell_stack_navigate_focus (StWidget *widget,
if (from && clutter_actor_contains (CLUTTER_ACTOR (widget), from))
return FALSE;
clutter_actor_grab_key_focus (CLUTTER_ACTOR (widget));
return TRUE;
if (CLUTTER_ACTOR_IS_MAPPED (CLUTTER_ACTOR (widget)))
{
clutter_actor_grab_key_focus (CLUTTER_ACTOR (widget));
return TRUE;
}
else
{
return FALSE;
}
}
top_actor = clutter_actor_get_last_child (CLUTTER_ACTOR (widget));