Fixed the bug not to send prediction_allow to imengine 83/129083/3
authorInHong Han <inhong1.han@samsung.com>
Fri, 12 May 2017 08:08:47 +0000 (17:08 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 16 May 2017 10:57:40 +0000 (10:57 +0000)
Change-Id: I88ff41a9b6215ba09561afd0e4e1316a1ef52f36

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 5b1091e..97d7193 100644 (file)
@@ -210,6 +210,7 @@ static bool                                             read_devices = false;
 
 static bool                                             _need_wl_im_init           = false;
 static struct _wl_im                                    *_wl_im_ctx                = NULL;
+static bool                                             _init_prediction_allow     = false;
 
 #define WAYLAND_MODULE_CLIENT_ID (0)
 #define MAX_PREEDIT_BUFSIZE 4000
@@ -274,7 +275,8 @@ _wsc_im_ctx_content_type (void *data, struct wl_input_method_context *im_ctx, ui
         // Set prediction allow
         old_hintbit = hint_copy & WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
         new_hintbit = hint & WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
-        if (old_hintbit != new_hintbit) {
+        if (old_hintbit != new_hintbit || !_init_prediction_allow) {
+            _init_prediction_allow = true;
             g_info_manager->set_prediction_allow (WAYLAND_MODULE_CLIENT_ID, wsc_context_prediction_allow_get (wsc_ctx));
         }
 
@@ -727,6 +729,7 @@ wl_im_destroy ()
     _wl_im_ctx->im_ctx = NULL;
     _wl_im_ctx->need_focus_event = EINA_FALSE;
     _need_wl_im_init = false;
+    _init_prediction_allow = false;
 }
 
 static void