From 0eeb0607e6289f385f9b511dbc5645361edc92f5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 10 Feb 2017 17:23:44 -0500 Subject: [PATCH] fix return code checking for errors when generating wl key events --- src/bin/e_comp_wl_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 0aa5eeec4..d8281c0dd 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -758,9 +758,9 @@ _event_generate(const char *key, const char *keyname, int mods, Eina_Bool up) * /usr/share/X11/xkb/keycodes/evdev is probably what your system is using */ keycode = _xkb_keymap_key_by_name(e_comp_wl->xkb.keymap, keyname ?: key); - if (!keycode) + if (keycode == -1) { - ERR("no keycode found for key '%s'", key); + ERR("no keycode found for key '%s'", keyname ?: key); return; } ev = calloc(1, sizeof(Ecore_Event_Key) + (2 * (strlen(key) + 1)));