summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorHannes Janetzek <hannes.janetzek@gmail.com>2016-12-15 05:18:39 +0100
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-12-15 11:35:41 -0500
commit1b0690dd9a9e58365601ba6aeda4988998647b1c (patch)
tree2c203946fa2531251e3c4400efbca799f92e782d /src/lib/ecore_x
parent3dfb7a6ba86dc91810a451b45b148d57f2e0a928 (diff)
ecore-x: fix Mode_switch key mapping
- remove redundant XKeysymToString when sym == sym2 @fix
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/ecore_x_events.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c
index 0049fca..b19d60a 100644
--- a/src/lib/ecore_x/ecore_x_events.c
+++ b/src/lib/ecore_x/ecore_x_events.c
@@ -344,7 +344,7 @@ _ecore_key_press(int event,
344 char *compose = NULL; 344 char *compose = NULL;
345 char *tmp = NULL; 345 char *tmp = NULL;
346 char *keyname; 346 char *keyname;
347 char *key; 347 char *key = NULL;
348 char keyname_buffer[256]; 348 char keyname_buffer[256];
349 char compose_buffer[256]; 349 char compose_buffer[256];
350 KeySym sym, sym2 = 0; 350 KeySym sym, sym2 = 0;
@@ -372,6 +372,12 @@ _ecore_key_press(int event,
372 sizeof(compose_buffer), 372 sizeof(compose_buffer),
373 &sym2, 373 &sym2,
374 &status); 374 &status);
375
376 if (sym != sym2)
377 key = XKeysymToString(sym2);
378 if (!key)
379 key = keyname;
380
375 if (val > 0) 381 if (val > 0)
376 { 382 {
377 compose_buffer[val] = 0; 383 compose_buffer[val] = 0;
@@ -381,13 +387,8 @@ _ecore_key_press(int event,
381 ERR("Ecore_X cannot convert input key string '%s' to UTF-8. " 387 ERR("Ecore_X cannot convert input key string '%s' to UTF-8. "
382 "Is Eina built with iconv support?", compose_buffer); 388 "Is Eina built with iconv support?", compose_buffer);
383 tmp = compose; 389 tmp = compose;
384 sym = sym2;
385 } 390 }
386 391
387 key = XKeysymToString(sym);
388 if (!key)
389 key = keyname;
390
391 key_len = strlen(key); 392 key_len = strlen(key);
392 keyname_len = strlen(keyname); 393 keyname_len = strlen(keyname);
393 compose_len = (compose) ? strlen(compose) : 0; 394 compose_len = (compose) ? strlen(compose) : 0;