From 2230a68e4211cf1b9785064483946a95ad3fec58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 30 Jun 2014 09:07:36 +0200 Subject: [PATCH] wayland: Follow _glfwInputChar() type change --- src/wl_init.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index c4dd58e1..bde0f98a 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -385,7 +385,7 @@ static void keyboardHandleKey(void* data, uint32_t state) { uint32_t code, num_syms; - long sym; + long cp; int keyCode; int action; const xkb_keysym_t *syms; @@ -403,9 +403,13 @@ static void keyboardHandleKey(void* data, if (num_syms == 1) { - sym = _glfwKeySym2Unicode(syms[0]); - if (sym != -1) - _glfwInputChar(window, sym); + cp = _glfwKeySym2Unicode(syms[0]); + if (cp != -1) + { + const int mods = _glfw.wl.xkb.modifiers; + const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT)); + _glfwInputChar(window, cp, mods, plain); + } } }