diff options
author | Daniel Stone <daniels@collabora.com> | 2016-04-27 14:06:38 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-05-05 15:04:00 -0400 |
commit | 0e44b8c38cf976a726d946112f613f83f3fb209c (patch) | |
tree | a0e7aac755c58f38041c111f058e447e0f6517a0 | |
parent | cdab14dc22d9ff0cef50413fd647cfdc071f3962 (diff) | |
download | gtk+-0e44b8c38cf976a726d946112f613f83f3fb209c.tar.gz |
wayland: Ignore NoSymbol keys
NoSymbol is not a valid GDK symbol (it only has the concept of
VoidSymbol, for some reason, which is neither the same thing nor
produced by any sane keymap). Passing NoSymbol events through to GTK+
apps is unlikely to produce anything useful.
In particular, this meant VTE would scroll to the end of the buffer when
pressing Fn (required for Page Up/Down on Macs), as it was receiving a
keypress that wasn't a modifeir. This does not happen on X11, as the
KEY_FN keycode is above 255, so does not get sent to clients.
https://bugzilla.gnome.org/show_bug.cgi?id=764825
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index dfe62d79e8..11b2f69d9f 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -1738,6 +1738,8 @@ deliver_key_event (GdkWaylandSeat *seat, xkb_keymap = _gdk_wayland_keymap_get_xkb_keymap (keymap); sym = xkb_state_key_get_one_sym (xkb_state, key); + if (sym == XKB_KEY_NoSymbol) + return; if (sym == XKB_KEY_NoSymbol) return; |