diff options
author | duna.oh <duna.oh@samsung.com> | 2024-01-03 19:27:37 +0900 |
---|---|---|
committer | duna.oh <duna.oh@samsung.com> | 2024-01-03 19:27:37 +0900 |
commit | 9ef469a1c9e27763494ee7e555772c36865d8d0b (patch) | |
tree | 1c2fb6d5e6239ef32d6b26c374f599ceb768b73b | |
parent | 28808adff6496b586d4398dde94f84e19205f577 (diff) | |
download | e-mod-tizen-gesture-accepted/tizen_unified_riscv.tar.gz e-mod-tizen-gesture-accepted/tizen_unified_riscv.tar.bz2 e-mod-tizen-gesture-accepted/tizen_unified_riscv.zip |
fix to add 'back key' event in input thread modeaccepted/tizen/unified/riscv/20240105.060120accepted/tizen/unified/20240104.053218accepted/tizen_unified_riscv
Change-Id: I4ae3b5fc852c30a088cef105eb1377693afdcf39
-rw-r--r-- | src/e_mod_gesture_events.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/e_mod_gesture_events.c b/src/e_mod_gesture_events.c index 5871612..6fe11f6 100644 --- a/src/e_mod_gesture_events.c +++ b/src/e_mod_gesture_events.c @@ -292,8 +292,6 @@ _e_gesture_send_back_key(Eina_Bool pressed) E_Gesture_Conf_Edd *conf = gesture->config->conf; E_Keyrouter_Event_Data *key_data; - EINA_SAFETY_ON_NULL_RETURN(e_comp_wl->xkb.keymap); - ev = E_NEW(Ecore_Event_Key, 1); EINA_SAFETY_ON_NULL_RETURN(ev); key_data = E_NEW(E_Keyrouter_Event_Data, 1); @@ -309,10 +307,18 @@ _e_gesture_send_back_key(Eina_Bool pressed) ev->window = e_comp->ee_win; ev->data = key_data; - if (pressed) - ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, _e_gesture_keyevent_free, NULL); + if (!e_input_thread_mode_get()) + { + ecore_event_add(pressed ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, ev, _e_gesture_keyevent_free, NULL); + } else - ecore_event_add(ECORE_EVENT_KEY_UP, ev, _e_gesture_keyevent_free, NULL); + { + E_Input_Event_Source *input_event_source = e_input_event_source_get(); + if (input_event_source) + e_input_event_add(input_event_source, pressed ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, ev, _e_gesture_keyevent_free, NULL); + else + _e_gesture_keyevent_free(NULL, ev); + } return; |