GNOME Bugzilla – Bug 684988
Keyboard navigation broken
Last modified: 2016-03-31 14:02:04 UTC
Keyboard navigation is totally broken in boxes due to clutter-gtk stealing all key events, not letting them propagate to the toplevel.
Created attachment 225276 [details] [review] Enable key navigation We derive from GtkClutterEmbed and remove focusability and key event handling. This means that to Gtk+ it looks like a dumb container which never gets any key events. This makes Gtk+ keynav work just like in any other container, although it means there will never be any Clutter key events. Thats fine though, as we just use Clutter as a rendering layer.
Created attachment 225277 [details] [review] Don't pass keynav keyboard events to search entry This will just cause weird beeps from e.g. the arrow handling of the entry reaching the end of the text. Instead we continue on eventually reaching the window-wide keynav code. When the entry actually has focus it will get the events directly, so entry keynav still works.
Note that you need https://bugzilla.gnome.org/show_bug.cgi?id=684984 for keyboard navigation inside the icon view to work.
Review of attachment 225276 [details] [review]: Not very familiar with clutter, but makes sense
Review of attachment 225277 [details] [review]: The key filtering looks a bit ugly, but I guess that's what we get for installing an application-wide key-pressed-event handler. ::: src/searchbar.vala @@ +97,3 @@ + event.keyval != Gdk.Key.Down && + event.keyval != Gdk.Key.Left && + event.keyval != Gdk.Key.Right) This is missing some keyvals used by GtkIconView: http://git.gnome.org/browse/gtk+/tree/gtk/gtkiconview.c#n876 also has: KP_Up, KP_Down, KP_Left, KP_Right, plus [KP_]Page_Up, [KP_]Page_Down and [KP_]Home and [KP_]End
Review of attachment 225277 [details] [review]: I marked this as 'reviewed', but this is an ACK once the missing keys issue is addressed
pushed
Attachment 225276 [details] pushed as cb24678 - Enable key navigation Attachment 225277 [details] pushed as 1c24277 - Don't pass keynav keyboard events to search entry