From: Inhong Han Date: Wed, 22 Jan 2025 00:59:00 +0000 (+0900) Subject: Modified not to show IME when the client window lost focus X-Git-Tag: accepted/tizen/9.0/unified/20250123.015622~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c420a6420a378d869075c50c096ba98bc3ff8b74;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Modified not to show IME when the client window lost focus Change-Id: I96ee89d94658d829e587d9d4e4f9961583d0ac3e --- diff --git a/src/e_mod_input_panel.c b/src/e_mod_input_panel.c index d89e257..c942d87 100644 --- a/src/e_mod_input_panel.c +++ b/src/e_mod_input_panel.c @@ -130,6 +130,7 @@ static E_Input_Panel *g_input_panel = NULL; static E_Input_Panel_Floating_Info *g_floating_info = NULL; static Eina_Bool panel_show_need_rerun = EINA_FALSE; static gint g_timer_wait_update = 0; +static Eina_Bool g_disable_input_panel_show = EINA_FALSE; static E_Input_Panel_Surface * _e_input_panel_surface_get(E_Client *ec) @@ -372,7 +373,10 @@ _wait_update_timer_handler(void *data) { LOGE("TIMED OUT while waiting for ready_set"); - _e_input_panel_surface_show(NULL); + if (!g_disable_input_panel_show) + _e_input_panel_surface_show(NULL); + else + LOGI("Ignore show request"); g_timer_wait_update = 0; @@ -388,6 +392,12 @@ _e_input_panel_surface_cb_ready_set(struct wl_client *client EINA_UNUSED, struct CHECK_INPUT_PANEL_SURFACE(ips); + if (g_disable_input_panel_show) + { + LOGI("Ignore show request"); + return; + } + LOGI("IPS::SHOW::READY\n"); // base_output_resolution @@ -1950,3 +1960,9 @@ void e_input_panel_floating_panel_move_resize(int x, int y, int w, int h) e_input_panel_floating_position_set(x, y); } + +void e_input_panel_show_disabled_set(Eina_Bool disabled) +{ + LOGI("disabled : %d", disabled); + g_disable_input_panel_show = disabled; +} diff --git a/src/e_mod_main.c b/src/e_mod_main.c index c4ca9a3..0f54ca5 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -1277,6 +1277,8 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource if (text_input->resource) wl_text_input_send_enter(text_input->resource, surface); + e_input_panel_show_disabled_set(EINA_FALSE); + return; err: @@ -1754,6 +1756,8 @@ _e_text_input_cb_get_hide_permission(struct wl_client *client EINA_UNUSED, struc if (text_input->resource) wl_text_input_send_hide_permission(text_input->resource, permission); + + e_input_panel_show_disabled_set(EINA_TRUE); } static void diff --git a/src/e_mod_main.h b/src/e_mod_main.h index 869262b..adbaaa7 100644 --- a/src/e_mod_main.h +++ b/src/e_mod_main.h @@ -33,6 +33,7 @@ void e_input_panel_pending_position_reset(void); void e_input_panel_floating_position_align_set(int x, int y, int align); void e_input_panel_floating_panel_move_resize(int x, int y, int w, int h); Eina_Bool e_input_panel_show_request_flag_get(void); +void e_input_panel_show_disabled_set(Eina_Bool disabled); typedef enum { TIZEN_PROFILE_UNKNOWN = 0,