From 0c403c8ca678208d5770211257d20581730d78b3 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. --- 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 e5bd578d..c6c72df2 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -808,10 +808,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__)