From 35b69c1af4af996fb4cdac329a941a155569d810 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 27 Sep 2018 21:05:30 +0200
Subject: [PATCH] wayland: Relax requirements for evdev events to have a evcode
There may be emulated events that don't contain those, it's fine to
go through the fallback paths for these.
---
src/wayland/meta-wayland-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index e3ba4f000..4ffe146d5 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -633,7 +633,7 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
{
MetaWaylandKeyboard *keyboard = grab->keyboard;
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
- guint32 code;
+ guint32 code = 0;
#ifdef HAVE_NATIVE_BACKEND
MetaBackend *backend = meta_get_backend ();
#endif
@@ -647,7 +647,7 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
#ifdef HAVE_NATIVE_BACKEND
if (META_IS_BACKEND_NATIVE (backend))
code = clutter_evdev_event_get_event_code (event);
- else
+ if (code == 0)
#endif
code = evdev_code (&event->key);
--
2.20.1