Modified not to show IME when the client window lost focus 62/318662/1
authorInhong Han <inhong1.han@samsung.com>
Wed, 22 Jan 2025 00:59:00 +0000 (09:59 +0900)
committerInhong Han <inhong1.han@samsung.com>
Wed, 22 Jan 2025 02:28:27 +0000 (11:28 +0900)
Change-Id: I96ee89d94658d829e587d9d4e4f9961583d0ac3e

src/e_mod_input_panel.c
src/e_mod_main.c
src/e_mod_main.h

index d89e257963625f3596d2bc60fd8014c9b649f224..c942d87534c4b46421b8b7a250adc2ae12b7cf44 100644 (file)
@@ -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;
+}
index 1648c886cf80b0b2a261082c8b248de0c2429844..e1f731f81de48e2850205b1195993e0f78a3b30d 100644 (file)
@@ -1290,6 +1290,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:
@@ -1773,6 +1775,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
index 869262b13e0cd656954c9f059ab43e5700e02f04..adbaaa7b7175e417a4db52815215ab7ed9d39e4d 100644 (file)
@@ -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,