summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-27 23:55:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-27 23:57:30 +0900
commit072674dbe2118a26d8616b56b4169a6e543805ef (patch)
treea3d8e81f8c86350594856900dd08582baf42d1ac /src/lib/ecore_x
parent20f418b8d7010aa3a4b9d174780a1dec8e76ef4e (diff)
efl - ecore c+ ecore-imf - fix odd case input when faking a real event
so ibus module for ecore-imf likes to send an x event back to ourselves faking a key... this works unless we are looking at modifiers that make make for odd combos with keysyms turned into keycodes. so actualyl use the correct original keycode plus state unless we are having to explicitly send a keysym from ibus core. this fixes T3703 @fix
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_events.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c b/src/lib/ecore_x/xlib/ecore_x_events.c
index 21e3489c4c..0049fca25d 100644
--- a/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -347,14 +347,15 @@ _ecore_key_press(int event,
347 char *key; 347 char *key;
348 char keyname_buffer[256]; 348 char keyname_buffer[256];
349 char compose_buffer[256]; 349 char compose_buffer[256];
350 KeySym sym; 350 KeySym sym, sym2 = 0;
351 XComposeStatus status; 351 XComposeStatus status;
352 int val; 352 int val;
353 int key_len, keyname_len, compose_len; 353 int key_len, keyname_len, compose_len;
354 354
355 _ecore_x_last_event_mouse_move = 0; 355 _ecore_x_last_event_mouse_move = 0;
356 keyname = XKeysymToString(_ecore_x_XKeycodeToKeysym(xevent->display, 356 sym = _ecore_x_XKeycodeToKeysym(xevent->display, xevent->keycode, 0);
357 xevent->keycode, 0)); 357 keyname = XKeysymToString(sym);
358
358 if (!keyname) 359 if (!keyname)
359 { 360 {
360 snprintf(keyname_buffer, 361 snprintf(keyname_buffer,
@@ -364,13 +365,12 @@ _ecore_key_press(int event,
364 keyname = keyname_buffer; 365 keyname = keyname_buffer;
365 } 366 }
366 367
367 sym = 0;
368 key = NULL; 368 key = NULL;
369 compose = NULL; 369 compose = NULL;
370 val = XLookupString(xevent, 370 val = XLookupString(xevent,
371 compose_buffer, 371 compose_buffer,
372 sizeof(compose_buffer), 372 sizeof(compose_buffer),
373 &sym, 373 &sym2,
374 &status); 374 &status);
375 if (val > 0) 375 if (val > 0)
376 { 376 {
@@ -381,6 +381,7 @@ _ecore_key_press(int event,
381 ERR("Ecore_X cannot convert input key string '%s' to UTF-8. " 381 ERR("Ecore_X cannot convert input key string '%s' to UTF-8. "
382 "Is Eina built with iconv support?", compose_buffer); 382 "Is Eina built with iconv support?", compose_buffer);
383 tmp = compose; 383 tmp = compose;
384 sym = sym2;
384 } 385 }
385 386
386 key = XKeysymToString(sym); 387 key = XKeysymToString(sym);