From: InHong Han Date: Tue, 19 Nov 2019 10:44:22 +0000 (+0900) Subject: Fixed the deadlock issue X-Git-Tag: accepted/tizen/5.5/unified/20191121.073301~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F218117%2F2;p=platform%2Fcore%2Fuifw%2Fisf.git Fixed the deadlock issue To prevent the deadlock issue, the process_key_event_done() should be called right away when the IME is terminated. Change-Id: I4e0badaa44acd29d9f341b5aef279dfd556bf854 --- diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp index d221678..af36973 100644 --- a/ism/src/isf_info_manager.cpp +++ b/ism/src/isf_info_manager.cpp @@ -281,6 +281,7 @@ class InfoManager::InfoManagerImpl bool m_refocus_needed; bool m_reshow_needed; bool m_restart_needed; + bool m_is_ise_alive; std::vector m_current_send_remoteinput_id; std::vector m_current_recv_remoteinput_id; @@ -442,6 +443,7 @@ public: m_refocus_needed (false), m_reshow_needed (false), m_restart_needed (true), + m_is_ise_alive (false), m_last_socket_client (-1), m_last_client_context (0), m_ise_context_buffer (NULL), m_ise_context_length (0), m_imdata_buffer (NULL), m_imdata_length (0) { @@ -1565,6 +1567,9 @@ public: bool process_key_event (KeyEvent& key, uint32 serial, uint32 keycode) { HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid); + if (m_is_ise_alive == false) + return false; + if (it != m_helper_client_index.end ()) { int client; uint32 context; @@ -2762,6 +2767,9 @@ public: lock (); m_client_repository [client_id] = info; + if (info.type == HELPER_CLIENT || info.type == HELPER_ACT_CLIENT) + m_is_ise_alive = true; + if (info.type == IMCONTROL_ACT_CLIENT) { m_pending_active_imcontrol_id = client_id; } else if (info.type == IMCONTROL_CLIENT) { @@ -2961,8 +2969,12 @@ public: lock (); HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client_id); - if (hiit != m_helper_active_info_repository.end ()) + if (hiit != m_helper_active_info_repository.end ()) { + if (hiit->second.uuid == m_current_helper_uuid) + m_is_ise_alive = false; + m_helper_active_info_repository.erase (hiit); + } unlock (); } else if (client_info.type == IMCONTROL_ACT_CLIENT) {