ecore-x: fix Mode_switch key mapping

- remove redundant XKeysymToString when sym == sym2

@fix
This commit is contained in:
Hannes Janetzek 2016-12-15 05:18:39 +01:00 committed by Mike Blumenkrantz
parent 3dfb7a6ba8
commit 1b0690dd9a
1 changed files with 7 additions and 6 deletions

View File

@ -344,7 +344,7 @@ _ecore_key_press(int event,
char *compose = NULL;
char *tmp = NULL;
char *keyname;
char *key;
char *key = NULL;
char keyname_buffer[256];
char compose_buffer[256];
KeySym sym, sym2 = 0;
@ -372,6 +372,12 @@ _ecore_key_press(int event,
sizeof(compose_buffer),
&sym2,
&status);
if (sym != sym2)
key = XKeysymToString(sym2);
if (!key)
key = keyname;
if (val > 0)
{
compose_buffer[val] = 0;
@ -381,13 +387,8 @@ _ecore_key_press(int event,
ERR("Ecore_X cannot convert input key string '%s' to UTF-8. "
"Is Eina built with iconv support?", compose_buffer);
tmp = compose;
sym = sym2;
}
key = XKeysymToString(sym);
if (!key)
key = keyname;
key_len = strlen(key);
keyname_len = strlen(keyname);
compose_len = (compose) ? strlen(compose) : 0;