Modified to prevent IME from restarting in on-demand mode 87/222787/1
authorInHong Han <inhong1.han@samsung.com>
Mon, 20 Jan 2020 05:05:49 +0000 (14:05 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 20 Jan 2020 05:07:48 +0000 (14:07 +0900)
Change-Id: I718f94b70036c7961933b7bf475fd5f6f454caeb

ism/src/isf_info_manager.cpp

index af36973..e980e27 100644 (file)
@@ -442,7 +442,7 @@ public:
           m_ise_exiting (false), m_is_imengine_aux (false), m_is_imengine_candidate (false),
           m_refocus_needed (false),
           m_reshow_needed (false),
-          m_restart_needed (true),
+          m_restart_needed (false),
           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),
@@ -2898,6 +2898,7 @@ public:
             lock ();
             HelperInfoRepository::iterator hiit = m_helper_info_repository.find (client_id);
 
+            bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
             if (hiit != m_helper_info_repository.end ()) {
                 bool restart = false;
                 String uuid = hiit->second.uuid;
@@ -2915,7 +2916,7 @@ public:
 
                 m_signal_stop_default_ise (false);
 
-                if (m_refocus_needed || m_reshow_needed)
+                if (m_refocus_needed || m_reshow_needed || !launch_ise_on_request)
                     m_restart_needed = true;
 
                 if (restart && !m_ise_exiting && m_restart_needed) {
@@ -2959,7 +2960,7 @@ public:
             }
 
             m_ise_exiting = false;
-            m_restart_needed = true;
+            m_restart_needed = launch_ise_on_request ? false : true;
             unlock ();
             socket_transaction_start ();
             m_signal_remove_helper (client_id);