Fix the issue that IME doesn't sometimes terminate in on-demand mode 09/173909/4
authorInHong Han <inhong1.han@samsung.com>
Tue, 27 Mar 2018 02:16:08 +0000 (11:16 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 3 Apr 2018 04:42:42 +0000 (13:42 +0900)
Change-Id: Icc023ec5417bbb76174526383b8eab71909bb26d

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 9d88744..14097c2 100644 (file)
@@ -211,6 +211,8 @@ static bool                                             _need_wl_im_init
 static struct _wl_im                                    *_wl_im_ctx                = NULL;
 static int                                              _ecore_wl2_init_count      = 0;
 
+static bool                                             _destroy_ise               = false;
+
 #define WAYLAND_MODULE_CLIENT_ID (0)
 #define MAX_PREEDIT_BUFSIZE 4000
 
@@ -864,6 +866,9 @@ _wsc_im_deactivate (void *data, struct wl_input_method *input_method, struct wl_
         isf_wsc_context_focus_out (wsc->wsc_ctx);
         _wl_im_ctx->need_focus_event = EINA_FALSE;
     }
+
+    if (_destroy_ise)
+        wl_im_destroy ();
 }
 
 static void
@@ -2515,6 +2520,7 @@ panel_initialize (void)
     _panel_client_id = WAYLAND_MODULE_CLIENT_ID;
     g_info_manager->register_panel_client (_panel_client_id, _panel_client_id);
     WSCContextISF* context_scim = _ic_list;
+    _destroy_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_DESTROY_ISE), _destroy_ise);
 
     while (context_scim != NULL) {
         //FIXME:modify the parameter