Fix bug that password mode is not initialized when changing layout 83/257383/1
authorInHong Han <inhong1.han@samsung.com>
Fri, 23 Apr 2021 07:38:30 +0000 (16:38 +0900)
committerInHong Han <inhong1.han@samsung.com>
Fri, 23 Apr 2021 07:48:02 +0000 (07:48 +0000)
Change-Id: Icbd20a31b9399d9bcad9415a943c5a084e13518e

ism/extras/wayland_immodule/wayland_imcontext.c

index 48eac33..b877ee5 100644 (file)
@@ -1917,9 +1917,10 @@ show_input_panel(Ecore_IMF_Context *ctx)
            ecore_imf_context_input_panel_return_key_type_get (ctx),
            ecore_imf_context_input_panel_return_key_disabled_get (ctx),
            ecore_imf_context_autocapital_type_get (ctx));
-    LOGD ("client_window : %#lx, Ecore_Wl2_Window : %p, password mode : %d, prediction_allow : %d, mime_type : %s, input panel position x : %d, y : %d",
+    LOGD ("client_window : %#lx, Ecore_Wl2_Window : %p, password mode : %d, sensitive data mode : %d, prediction_allow : %d, mime_type : %s, input panel position x : %d, y : %d",
            (unsigned long int)ecore_imf_context_client_window_get (ctx),
            imcontext->window,
+           (imcontext->content_hint & WL_TEXT_INPUT_CONTENT_HINT_PASSWORD) ? 1 : 0,
            (imcontext->content_hint & WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA) ? 1 : 0,
            ecore_imf_context_prediction_allow_get (ctx),
            imcontext->mime_type,
@@ -3693,6 +3694,9 @@ wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx,
             break;
     }
 
+    if (layout != ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD)
+        imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+
     if (imcontext->input && imcontext->text_input) {
         LOGD ("ctx : %p, layout type : %d", ctx, layout);
         wl_text_input_set_content_type(imcontext->text_input,