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 737135 - keybindings: Don't assume a fixed above_tab keycode on non-linux systems
keybindings: Don't assume a fixed above_tab keycode on non-linux systems
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-22 17:54 UTC by Florian Müllner
Modified: 2014-09-22 19:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keybindings: Expose get_keycodes_for_keysym() (2.39 KB, patch)
2014-09-22 17:54 UTC, Florian Müllner
none Details | Review
keybindings: Don't assume a fixed above_tab keycode on non-linux systems (11.64 KB, patch)
2014-09-22 17:54 UTC, Florian Müllner
rejected Details | Review
keybindings: Do not depend on linux headers for above-tab key (1.14 KB, patch)
2014-09-22 19:50 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2014-09-22 17:54:00 UTC
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=729490#c24.
Comment 1 Florian Müllner 2014-09-22 17:54:03 UTC
Created attachment 286834 [details] [review]
keybindings: Expose get_keycodes_for_keysym()

We will soon use it to compute the key-above-tab on non-linux systems.
Comment 2 Florian Müllner 2014-09-22 17:54:09 UTC
Created attachment 286835 [details] [review]
keybindings: Don't assume a fixed above_tab keycode on non-linux systems

Commit 2f229c3928be3a removed the code to compute the above-tab
keycode and replaced it with a simple constant. However the
new code assumes evdev on linux, which obviously breaks on
other systems; restore most of commit 2f229c3928be3a for those.
Comment 3 Ting-Wei Lan 2014-09-22 18:22:32 UTC
These patches build and work on FreeBSD 10.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-09-22 19:35:14 UTC
Review of attachment 286835 [details] [review]:

No.
Comment 5 Florian Müllner 2014-09-22 19:50:51 UTC
Created attachment 286839 [details] [review]
keybindings: Do not depend on linux headers for above-tab key

Commit 2f229c3928be3a removed the code to compute the above-tab
keycode and replaced it with a simple constant from linux/input.h.
We obviously cannot depend on linux headers on non-linux systems,
so provide a fallback definition in that case (which is expected
to work assuming the system is using the Xorg xf86-input-keyboard
driver).

I'm not overly happy with making blunt assumptions like that, but well ...
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-09-22 19:55:27 UTC
Review of attachment 286839 [details] [review]:

Looks good to me.

::: src/core/keybindings.c
@@ +44,3 @@
 #include <linux/input.h>
+#elif !defined KEY_GRAVE
+#define KEY_GRAVE 0x29 /* assume the use of xf86-input-keyboard */

This is the same exact value as in linux/input.h, so the comment might be a bit misleading, but I'm fine with it.
Comment 7 Florian Müllner 2014-09-22 19:57:30 UTC
Attachment 286839 [details] pushed as 565b9d7 - keybindings: Do not depend on linux headers for above-tab key