From: InHong Han Date: Tue, 16 Jul 2019 05:47:37 +0000 (+0900) Subject: elm_entry : Modified to prevent sending wrong input hint X-Git-Tag: accepted/tizen/unified/20190722.074730~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F210128%2F2;p=platform%2Fupstream%2Fefl.git elm_entry : Modified to prevent sending wrong input hint Change-Id: I96e82713d33b12281d85cc6b73a2dae097dbc469 --- diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c index ee57601..34d5919 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c @@ -882,6 +882,11 @@ ecore_imf_context_input_hint_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Hints i if (ctx->input_hints != input_hints) { + if (input_hints & ECORE_IMF_INPUT_HINT_AUTO_COMPLETE) + ctx->allow_prediction = EINA_TRUE; + else + ctx->allow_prediction = EINA_FALSE; + if (ctx->klass && ctx->klass->input_hint_set) ctx->klass->input_hint_set(ctx, input_hints); diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 7ddc0a6..c299012 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -7050,6 +7050,12 @@ EOLIAN static void _elm_entry_prediction_allow_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Eina_Bool prediction) { sd->prediction_allow = prediction; + + if (prediction == EINA_FALSE) + sd->input_hints &= ~ELM_INPUT_HINT_AUTO_COMPLETE; + else + sd->input_hints |= ELM_INPUT_HINT_AUTO_COMPLETE; + edje_object_part_text_prediction_allow_set (sd->entry_edje, "elm.text", prediction); } @@ -7065,6 +7071,11 @@ _elm_entry_input_hint_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Elm_Input_Hin { sd->input_hints = hints; + if (hints & ELM_INPUT_HINT_AUTO_COMPLETE) + sd->prediction_allow = EINA_TRUE; + else + sd->prediction_allow = EINA_FALSE; + edje_object_part_text_input_hint_set (sd->entry_edje, "elm.text", (Edje_Input_Hints)hints); }