mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 00:05:32 +00:00
weston-terminal: Fix crash on first keystroke
Since 894b3rcc634 weston-terminal will crash on first keystroke if you fail to create an xkb compose state. This can happen if you don't have a Compose file. Instead, now we just return uncomposed symbols. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
b8c16c995b
commit
2b685d9de9
|
@ -3108,6 +3108,8 @@ static xkb_keysym_t
|
||||||
process_key_press(xkb_keysym_t sym, struct input *input)
|
process_key_press(xkb_keysym_t sym, struct input *input)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_XKBCOMMON_COMPOSE
|
#ifdef HAVE_XKBCOMMON_COMPOSE
|
||||||
|
if (!input->xkb.compose_state)
|
||||||
|
return sym;
|
||||||
if (sym == XKB_KEY_NoSymbol)
|
if (sym == XKB_KEY_NoSymbol)
|
||||||
return sym;
|
return sym;
|
||||||
if (xkb_compose_state_feed(input->xkb.compose_state,
|
if (xkb_compose_state_feed(input->xkb.compose_state,
|
||||||
|
|
Loading…
Reference in a new issue