[mutter/wip/carlosg/im-forward-key: 4/6] wayland: Relax requirements for evdev events to have a evcode
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/im-forward-key: 4/6] wayland: Relax requirements for evdev events to have a evcode
- Date: Tue, 2 Oct 2018 11:26:51 +0000 (UTC)
commit c610fe60de5bc0fc829523f46872a00951bef6ca
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 27 21:05:30 2018 +0200
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 3322abc0c..97fb6bbed 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -642,7 +642,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
@@ -655,7 +655,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]