Add the new configuration to determine automatic restarting of IME 58/276158/1
authorInHong Han <inhong1.han@samsung.com>
Fri, 10 Jun 2022 05:12:50 +0000 (14:12 +0900)
committerInHong Han <inhong1.han@samsung.com>
Fri, 10 Jun 2022 08:07:16 +0000 (17:07 +0900)
Change-Id: Iee8e434dc6d83e28aa045cd3763a8e725b3ad805

ism/configs/global
ism/extras/efl_panel/isf_panel_efl.cpp
ism/src/isf_info_manager.cpp
ism/src/scim_config_path.h

index 3f2f937..054f599 100755 (executable)
@@ -21,3 +21,4 @@
 /LockScreenClassName = LOCK_SCREEN, hub-idlescreen
 /LaunchRemoteInput = true
 /LaunchWebServer = true
+/EnableAutoRestartIse = true
\ No newline at end of file
index 98910f2..c86bbd6 100644 (file)
@@ -459,6 +459,7 @@ static bool               _launch_ise_on_request            = false;
 static bool               _auto_destroy_ise                 = false;
 static bool               _soft_keyboard_launched           = false;
 static bool               _focus_in                         = false;
+static bool               _enable_auto_restart              = true;
 
 #if ISF_BUILD_CANDIDATE_UI
 static bool               candidate_expanded                = false;
@@ -2133,6 +2134,7 @@ static void load_config (void)
     }
     _launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), _launch_ise_on_request);
     _auto_destroy_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_DESTROY_ISE), _auto_destroy_ise);
+    _enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), _enable_auto_restart);
 
     isf_load_ise_information (ALL_ISE, _config);
 }
@@ -6405,7 +6407,7 @@ static void slot_start_default_ise (void)
             if (STATUS_DYING == aul_app_get_status (uuid.c_str ()))
                 pid = -1;
         }
-        if (_launch_ise_on_request && !_soft_keyboard_launched && pid < 0) {
+        if ((_launch_ise_on_request || !_enable_auto_restart) && !_soft_keyboard_launched && pid < 0) {
             LOGD ("Start helper (%s)", uuid.c_str ());
             set_keyboard_engine (String (SCIM_COMPOSE_KEY_FACTORY_UUID));
 
index 6dfd8aa..4315e12 100644 (file)
@@ -1541,7 +1541,8 @@ public:
             m_signal_show_ise ();
         } else {
             bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
-            if (launch_ise_on_request)
+            bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
+            if (launch_ise_on_request || !enable_auto_restart)
                 m_signal_start_default_ise ();
         }
     }
@@ -3008,6 +3009,7 @@ public:
             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);
+            bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
             if (hiit != m_helper_info_repository.end ()) {
                 bool restart = false;
                 String uuid = hiit->second.uuid;
@@ -3025,7 +3027,7 @@ public:
 
                 m_signal_stop_default_ise (false);
 
-                if (m_refocus_needed || m_reshow_needed || !launch_ise_on_request)
+                if ((m_refocus_needed || m_reshow_needed || !launch_ise_on_request) && enable_auto_restart)
                     m_restart_needed = true;
 
                 if (restart && !m_ise_exiting && m_restart_needed) {
index bce31fc..56271e2 100644 (file)
@@ -96,6 +96,7 @@ namespace scim {
 #define SCIM_GLOBAL_CONFIG_LOCK_SCREEN_CLASS_NAME                   "/LockScreenClassName"
 #define SCIM_GLOBAL_CONFIG_LAUNCH_WEB_SERVER                        "/LaunchWebServer"
 #define SCIM_GLOBAL_CONFIG_QUICK_PANEL_ICON_PATH                    "/QuickpanelIconPath"
+#define SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE                  "/EnableAutoRestartIse"
 
 #define ISF_CONFIG_HARDWARE_KEYBOARD_DETECT                         "/isf/hw_keyboard_detect"