summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-11-22 13:00:38 -0600
committerDaniel Stone <daniels@collabora.com>2016-11-22 19:14:40 +0000
commit2b685d9de939d7ab3886882d1f816c26abbf25c1 (patch)
tree4f66322128021a00dbb34d648f65c8ba7d037c5b /clients
parentb8c16c995b02ca797a5ea7625756e6debe91220b (diff)
downloadweston-2b685d9de939d7ab3886882d1f816c26abbf25c1.tar.gz
weston-2b685d9de939d7ab3886882d1f816c26abbf25c1.tar.bz2
weston-2b685d9de939d7ab3886882d1f816c26abbf25c1.zip
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>
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index a82f05cb..ac35c3d6 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -3108,6 +3108,8 @@ static xkb_keysym_t
process_key_press(xkb_keysym_t sym, struct input *input)
{
#ifdef HAVE_XKBCOMMON_COMPOSE
+ if (!input->xkb.compose_state)
+ return sym;
if (sym == XKB_KEY_NoSymbol)
return sym;
if (xkb_compose_state_feed(input->xkb.compose_state,