mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Wayland: Stop crashing when Compose is unavailable
There was a missing check for when no Compose key was configured in the xkb file, making _glfw.wl.xkb.composeState NULL and crashing on key press. Closes #1059.
This commit is contained in:
parent
2d0ffd788b
commit
0019f7a45e
|
@ -294,7 +294,7 @@ static int toGLFWKeyCode(uint32_t key)
|
||||||
|
|
||||||
static xkb_keysym_t composeSymbol(xkb_keysym_t sym)
|
static xkb_keysym_t composeSymbol(xkb_keysym_t sym)
|
||||||
{
|
{
|
||||||
if (sym == XKB_KEY_NoSymbol)
|
if (sym == XKB_KEY_NoSymbol || !_glfw.wl.xkb.composeState)
|
||||||
return sym;
|
return sym;
|
||||||
if (xkb_compose_state_feed(_glfw.wl.xkb.composeState, sym)
|
if (xkb_compose_state_feed(_glfw.wl.xkb.composeState, sym)
|
||||||
!= XKB_COMPOSE_FEED_ACCEPTED)
|
!= XKB_COMPOSE_FEED_ACCEPTED)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user