diff options
author | Sungmin Kwak <sungmin.kwak@samsung.com> | 2019-09-02 10:06:25 +0900 |
---|---|---|
committer | Sungmin Kwak <sungmin.kwak@samsung.com> | 2019-09-02 16:48:03 +0900 |
commit | bbb71be52ac5d21871c0ff90a147cef44daca623 (patch) | |
tree | f64e7a08014b20f4ae566ae0d12797fdebce76de /ism | |
parent | 1be83d5847e9a5b10f09fac29596c750ae1183c7 (diff) | |
download | isf-bbb71be52ac5d21871c0ff90a147cef44daca623.tar.gz isf-bbb71be52ac5d21871c0ff90a147cef44daca623.tar.bz2 isf-bbb71be52ac5d21871c0ff90a147cef44daca623.zip |
Initialize the input resource mode after the remote input is finished.
Change-Id: I2ef9e6f3fd94f3790c1622b663cbcf54627770d7
Diffstat (limited to 'ism')
-rw-r--r-- | ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index ec501d23..b8dbbc2b 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 |