ecore_imf: Modified to prevent sending wrong input hint 36/209636/2
authorInHong Han <inhong1.han@samsung.com>
Tue, 9 Jul 2019 09:31:17 +0000 (18:31 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 10 Jul 2019 00:41:25 +0000 (09:41 +0900)
Change-Id: Ia20c10946c7e194a3db189f01443107ce5070bc3

src/lib/ecore_imf/ecore_imf_context.c

index 15fad6c..ee57601 100644 (file)
@@ -440,6 +440,11 @@ ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool predict
      {
         ctx->allow_prediction = prediction;
 
+        if (prediction == EINA_FALSE)
+          ctx->input_hints &= ~ECORE_IMF_INPUT_HINT_AUTO_COMPLETE;
+        else
+          ctx->input_hints |= ECORE_IMF_INPUT_HINT_AUTO_COMPLETE;
+
         if (ctx->klass && ctx->klass->prediction_allow_set)
           ctx->klass->prediction_allow_set(ctx, prediction);
      }
@@ -908,7 +913,7 @@ ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx)
      }
 
    show_req_ctx = ctx;
-   if ((ctx->input_panel_enabled) || 
+   if ((ctx->input_panel_enabled) ||
        (getenv("ECORE_IMF_INPUT_PANEL_ENABLED")))
      {
         if (ctx->klass && ctx->klass->show) ctx->klass->show(ctx);
@@ -925,7 +930,7 @@ ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx)
         return;
      }
 
-   if ((ctx->input_panel_enabled) || 
+   if ((ctx->input_panel_enabled) ||
        (getenv("ECORE_IMF_INPUT_PANEL_ENABLED")))
      {
         if (ctx->klass && ctx->klass->hide) ctx->klass->hide(ctx);