From 4005863e3d42ef4e648582d33e894a1061ace841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 27 Feb 2012 19:46:19 +0100 Subject: [PATCH] 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 --- src/st/st-widget.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 3d0b64a64..5c88cdbf9 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -719,7 +719,19 @@ st_widget_get_paint_volume (ClutterActor *self, static GList * 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); }