From 117f7694b2d8b2341145746679953198b98d6bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 19 May 2020 17:44:59 +0200 Subject: [PATCH] X11: Fix XKB group event depending on state query This fixes XKB group change events not being enabled if the initial XKB keyboard state query fails. (cherry picked from commit 0c403c8ca678208d5770211257d20581730d78b3) --- src/x11_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index b6399c56..ad083f87 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -769,10 +769,9 @@ static GLFWbool initExtensions(void) _glfw.x11.xkb.group = 0; XkbStateRec state; if (XkbGetState(_glfw.x11.display, XkbUseCoreKbd, &state) == Success) - { - XkbSelectEventDetails(_glfw.x11.display, XkbUseCoreKbd, XkbStateNotify, XkbAllStateComponentsMask, XkbGroupStateMask); _glfw.x11.xkb.group = (unsigned int)state.group; - } + + XkbSelectEventDetails(_glfw.x11.display, XkbUseCoreKbd, XkbStateNotify, XkbAllStateComponentsMask, XkbGroupStateMask); } #if defined(__CYGWIN__)