Modified to prevent passing invalid IME geometry to the app 18/271518/1
authorInHong Han <inhong1.han@samsung.com>
Tue, 22 Feb 2022 08:57:36 +0000 (17:57 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 22 Feb 2022 08:58:22 +0000 (17:58 +0900)
When IME is in floating mode, IME doesn't know the exact x, y coordinates.

Change-Id: I0c042f944401e9db934cc003a6429577e10a8de7

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

index 5b0e824f6dc92d66590bff43cc6608fd7e62cb65..1e2346c6097bb7e0c2bb62e9fe2d107bf0ad35a4 100644 (file)
@@ -1665,4 +1665,24 @@ void e_input_panel_floating_panel_set(Eina_Bool state)
 void e_input_panel_floating_drag_enabled(Eina_Bool enabled)
 {
    g_floating_info->moving_req = enabled;
+}
+
+Eina_Bool e_input_panel_floating_mode_get()
+{
+   E_Input_Panel_Surface *ips;
+   Eina_List *l;
+   Eina_List *l_next;
+   Eina_Bool ret = EINA_FALSE;
+
+   if (!g_input_panel) return ret;
+
+   EINA_LIST_FOREACH_SAFE(g_input_panel->surfaces, l, l_next, ips)
+     {
+        if (ips && ips->ec)
+          {
+             ret = ips->ec->vkbd.floating;
+          }
+     }
+
+   return ret;
 }
\ No newline at end of file
index 4f225b0ff4b456bc5f9d41b19182de3c1b060b2a..46a27012d811b252c9078af2ceb76c400d116ad9 100644 (file)
@@ -1092,7 +1092,7 @@ _e_text_input_method_context_cb_update_ise_geometry(struct wl_client *client EIN
          return;
       }
 
-    if ((context->input) && (context->input->resource))
+    if ((context->input) && (context->input->resource) && !(e_input_panel_floating_mode_get()))
       {
          _e_text_input_send_input_panel_geometry(context->input->resource, x, y, width, height);
          g_updated_geometry = EINA_TRUE;
index 8809418bd99bd3d71e3808926c254729a23b5933..5dfb8ad78fc47be91a65ecc57cad279f0dd0d240 100644 (file)
@@ -27,6 +27,7 @@ Eina_Bool   e_input_panel_surface_destroy(E_Client *ec);
 int         e_input_panel_is_effect_running(void);
 void        e_input_panel_floating_panel_set(Eina_Bool state);
 void        e_input_panel_floating_drag_enabled(Eina_Bool enabled);
+Eina_Bool   e_input_panel_floating_mode_get(void);
 
 typedef enum {
    TIZEN_PROFILE_UNKNOWN = 0,