Send input_panel_enabled value to ISF panel 28/268828/4
authorInHong Han <inhong1.han@samsung.com>
Mon, 3 Jan 2022 10:57:20 +0000 (19:57 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 3 Mar 2022 10:04:25 +0000 (19:04 +0900)
Change-Id: I3c7dee04ebbbb0a575e0afc835917b7e84032b54

src/e_mod_main.c

index b41113e..9584907 100644 (file)
@@ -146,7 +146,6 @@ static E_Client *client_surface_ec = NULL;
 static E_Text_Input *g_show_text_input = NULL;
 static struct wl_client *g_show_client = NULL;
 static Eina_Bool g_updated_geometry = EINA_FALSE;
-static Eina_Bool g_input_panel_enabled = EINA_TRUE;
 
 /* The candidate's show state that was requested by the application or IME */
 static Eina_Bool g_show_state_candidate = EINA_FALSE;
@@ -2059,6 +2058,8 @@ static void
 _e_text_input_cb_input_panel_enabled_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t enabled)
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
+   E_Input_Method *input_method = NULL;
+   Eina_List *l = NULL;
 
    if (!text_input)
      {
@@ -2068,7 +2069,13 @@ _e_text_input_cb_input_panel_enabled_set(struct wl_client *client EINA_UNUSED, s
         return;
      }
 
-   g_input_panel_enabled = enabled;
+   EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
+     {
+        if (!input_method || !input_method->context) continue;
+
+        if (input_method->context->resource)
+          zwp_input_method_context_v1_send_input_panel_enabled(input_method->context->resource, enabled);
+     }
 }
 
 static void