After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684988 - Keyboard navigation broken
Keyboard navigation broken
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.5.x (unsupported)
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-27 17:53 UTC by Alexander Larsson
Modified: 2016-03-31 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Enable key navigation (3.02 KB, patch)
2012-09-27 17:54 UTC, Alexander Larsson
committed Details | Review
Don't pass keynav keyboard events to search entry (1.40 KB, patch)
2012-09-27 17:54 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-09-27 17:53:56 UTC
Keyboard navigation is totally broken in boxes due to clutter-gtk stealing all key events, not letting them propagate to the toplevel.
Comment 1 Alexander Larsson 2012-09-27 17:54:23 UTC
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.
Comment 2 Alexander Larsson 2012-09-27 17:54:25 UTC
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.
Comment 3 Alexander Larsson 2012-09-27 17:55:05 UTC
Note that you need https://bugzilla.gnome.org/show_bug.cgi?id=684984 for keyboard navigation inside the icon view to work.
Comment 4 Christophe Fergeau 2012-09-28 09:34:58 UTC
Review of attachment 225276 [details] [review]:

Not very familiar with clutter, but makes sense
Comment 5 Christophe Fergeau 2012-09-28 09:49:59 UTC
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
Comment 6 Christophe Fergeau 2012-09-28 09:50:43 UTC
Review of attachment 225277 [details] [review]:

I marked this as 'reviewed', but this is an ACK once the missing keys issue is addressed
Comment 7 Alexander Larsson 2012-09-28 12:00:04 UTC
pushed
Comment 8 Alexander Larsson 2012-10-01 08:12:33 UTC
Attachment 225276 [details] pushed as cb24678 - Enable key navigation
Attachment 225277 [details] pushed as 1c24277 - Don't pass keynav keyboard events to search entry