st-widget: Fix get_focus_chain()

The get_focus_chain() implementation in StWidget just returns all
children, it should filter for visible children instead. This
breaks keyboard navigation in various places since commit 72dad591
removed the correct implementation in StContainer.

https://bugzilla.gnome.org/show_bug.cgi?id=670904
This commit is contained in:
Florian Müllner 2012-02-27 19:46:19 +01:00
parent 70cdb67f31
commit 4005863e3d

View File

@ -719,7 +719,19 @@ st_widget_get_paint_volume (ClutterActor *self,
static GList * static GList *
st_widget_real_get_focus_chain (StWidget *widget) st_widget_real_get_focus_chain (StWidget *widget)
{ {
return clutter_actor_get_children (CLUTTER_ACTOR (widget)); GList *children;
GList *focus_chain = NULL;
for (children = clutter_actor_get_children (CLUTTER_ACTOR (widget));
children;
children = children->next)
{
ClutterActor *child = children->data;
if (CLUTTER_ACTOR_IS_VISIBLE (child))
focus_chain = g_list_prepend (focus_chain, child);
}
return g_list_reverse (focus_chain);
} }