mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 04:53:50 +00:00
parent
36f90800d8
commit
d232bcfcdd
@ -1180,14 +1180,17 @@ static void processEvent(XEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (_glfw.x11.xkb.available && event->type == _glfw.x11.xkb.eventBase)
|
||||
if (_glfw.x11.xkb.available)
|
||||
{
|
||||
if (event->type == _glfw.x11.xkb.eventBase + XkbEventCode)
|
||||
{
|
||||
if (((XkbEvent*) event)->any.xkb_type == XkbStateNotify &&
|
||||
((XkbEvent *)event)->state.changed & XkbGroupStateMask)
|
||||
(((XkbEvent*) event)->state.changed & XkbGroupStateMask))
|
||||
{
|
||||
_glfw.x11.xkb.group = ((XkbEvent*) event)->state.group;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event->type == GenericEvent)
|
||||
{
|
||||
@ -2789,7 +2792,8 @@ const char* _glfwPlatformGetScancodeName(int scancode)
|
||||
if (!_glfw.x11.xkb.available)
|
||||
return NULL;
|
||||
|
||||
const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 0);
|
||||
const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display,
|
||||
scancode, _glfw.x11.xkb.group, 0);
|
||||
if (keysym == NoSymbol)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user