From 58a86e85d11d09f3b51e791049666ec97d28edd1 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Fri, 23 Apr 2021 16:38:30 +0900 Subject: [PATCH] Fix bug that password mode is not initialized when changing layout Change-Id: Icbd20a31b9399d9bcad9415a943c5a084e13518e --- ism/extras/wayland_immodule/wayland_imcontext.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 48eac33..b877ee5 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -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, -- 2.7.4