[gnome-shell] st-widget: Fix get_focus_chain()
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-widget: Fix get_focus_chain()
- Date: Mon, 27 Feb 2012 19:13:44 +0000 (UTC)
commit 4005863e3d42ef4e648582d33e894a1061ace841
Author: Florian MÃllner <fmuellner gnome org>
Date: Mon Feb 27 19:46:19 2012 +0100
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 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 3d0b64a..5c88cdb 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]