From: Ji-hoon Lee Date: Tue, 29 Aug 2017 06:43:15 +0000 (+0900) Subject: Remove IME from the client repository when sending EXIT command X-Git-Tag: accepted/tizen/unified/20170913.071437~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F38%2F147838%2F2;p=platform%2Fcore%2Fuifw%2Fisf.git Remove IME from the client repository when sending EXIT command Even after sending EXIT command to the currently selected IME, the IME may not get destroyed right away due to its termination logic, meaning the client repository still holds the IME info until the socket connection is completely closed. This would cause an unexpected result if the user first selects IME A and then IME B, and IME A again. After the last "IME A selected" event, if the socket connection to previous IME A gets closed, panel would think the current IME (that was launched due to the last selection for IME A) needs to be restarted, so it tries launching new IME A instance. To prevent this, we will going to remove IME info from client repository right after we send the EXIT request command. Change-Id: I28cdcf7796028d59cc6929c182abd64868309053 --- diff --git a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp index b334374..084b398 100644 --- a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp +++ b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp @@ -1028,6 +1028,8 @@ private: Socket client_socket(client); m_send_trans.write_to_socket(client_socket); + + m_info_manager->del_client(client_socket.get_id()); } bool process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result) { diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp index 6f26f67..01475f6 100644 --- a/ism/src/isf_info_manager.cpp +++ b/ism/src/isf_info_manager.cpp @@ -2685,6 +2685,11 @@ public: } void del_client (int client_id) { + ClientRepository::iterator iter = m_client_repository.find(client_id); + if (iter == m_client_repository.end()) { + LOGW("The client with id %d does not exist in our client repository, returning", client_id); + return; + } lock (); m_signal_close_connection (client_id); ClientInfo client_info = socket_get_client_info (client_id);