mirror of
https://github.com/glfw/glfw.git
synced 2025-04-05 21:45:08 +00:00
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.
This commit is contained in:
parent
844bc8031c
commit
0c403c8ca6
1 changed files with 2 additions and 3 deletions
|
@ -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__)
|
||||
|
|
Loading…
Add table
Reference in a new issue