From: Sungmin Kwak Date: Mon, 2 Sep 2019 01:06:25 +0000 (+0900) Subject: Initialize the input resource mode after the remote input is finished. X-Git-Tag: accepted/tizen/unified/20190918.102224~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F213173%2F1;p=platform%2Fcore%2Fuifw%2Fisf.git Initialize the input resource mode after the remote input is finished. Change-Id: I2ef9e6f3fd94f3790c1622b663cbcf54627770d7 --- diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index ec501d2..b8dbbc2 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -2862,6 +2862,14 @@ static uint32_t _keyname_to_keysym (uint32_t keyname, uint32_t *modifiers) } } +static bool _check_remote_input_finished (const uint32 keycode, const bool pressed, const bool fake) +{ + if (pressed == false && fake == true && (keycode == SCIM_KEY_Select || keycode == SCIM_KEY_Cancel)) { + return true; + } + return false; +} + static void send_wl_key_event (WSCContextISF *ic, const KeyEvent &key, bool fake) { SCIM_DEBUG_FRONTEND (1) << __FUNCTION__ << "...\n"; @@ -2884,8 +2892,11 @@ static void send_wl_key_event (WSCContextISF *ic, const KeyEvent &key, bool fake _keyname_to_keysym (key.code, &modifiers); - if (ic) + if (ic) { wsc_context_send_key (ic, key.code, modifiers, time, key.is_key_press ()); + if (_check_remote_input_finished (key.code, key.is_key_press (), fake)) + ic->impl->input_resource = INPUT_RESOURCE_NONE; + } } static void