From: InHong Han Date: Thu, 30 Jul 2020 07:26:34 +0000 (+0900) Subject: Modified to forward back key event to IME before forwarding it to the application X-Git-Tag: accepted/tizen/unified/20200731.145807~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0289a3fc4e96838b410da1f82f2434305b05d94;p=platform%2Fcore%2Fuifw%2Fisf.git Modified to forward back key event to IME before forwarding it to the application If the back key event is forwarded to the application first after the IME's option window is shown, application with environment variable, IME, option window will be hidden at once. Change-Id: I22cad4445c3c4e71235eb621c3d6eabcfec4c731 --- diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 242227f..4cb63c3 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -818,8 +818,6 @@ key_down_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) if (!active_ctx) return ECORE_CALLBACK_PASS_ON; /* the event is kept */ - if (check_nograb_backkey()) return ECORE_CALLBACK_PASS_ON; /* the event is kept */ - if ((_input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_SHOW || _input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW) && check_hide_key(ev->keyname)) { @@ -836,10 +834,13 @@ key_down_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) _ecore_event_to_ecore_imf_key_down_event(ev, &imf_event); - if (_focused_ctx) + if (_focused_ctx) { filter_ret = ecore_imf_context_filter_event(_focused_ctx, ECORE_IMF_EVENT_KEY_DOWN, (Ecore_IMF_Event *)&imf_event); - else + } else { LOGD("no focus"); + if (check_nograb_backkey()) + return ECORE_CALLBACK_PASS_ON; /* the event is kept */ + } SECURE_LOGD ("%s key is pressed. ret : %d", ev->keyname, filter_ret); return ECORE_CALLBACK_DONE; /* the event is removed from the queue */ @@ -857,8 +858,6 @@ key_up_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) if (!active_ctx) return ECORE_CALLBACK_PASS_ON; /* the event is kept */ - if (check_nograb_backkey()) return ECORE_CALLBACK_PASS_ON; /* the event is kept */ - if (_input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_HIDE || !check_hide_key(ev->keyname)) return ECORE_CALLBACK_PASS_ON; /* the event is kept */ @@ -885,6 +884,9 @@ key_up_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_DONE; /* the event is removed from the queue */ } else { + if (check_nograb_backkey()) + return ECORE_CALLBACK_PASS_ON; /* the event is kept */ + ecore_imf_context_reset(active_ctx); _input_panel_hide(active_ctx, EINA_TRUE); return ECORE_CALLBACK_DONE; /* the event is removed from the queue */