Modified to not send previous IME geometry to app 16/222816/1
authorInHong Han <inhong1.han@samsung.com>
Fri, 17 Jan 2020 06:37:39 +0000 (15:37 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 20 Jan 2020 08:39:18 +0000 (08:39 +0000)
Change-Id: Ib74df9abeea411e180d61e9834abf28b3b462f38
(cherry picked from commit 8c1a96409de51d7f96a58ead0b0a9c86fd5f2b0b)

src/e_mod_main.c

index bbaf1f2..6dfe05b 100644 (file)
@@ -2357,8 +2357,13 @@ _e_text_input_method_context_cb_client_resize(void *data EINA_UNUSED, int type E
    if (!found) return ECORE_CALLBACK_PASS_ON;
    if ((ec->w < 1) && (ec->h < 1)) return ECORE_CALLBACK_PASS_ON;
 
-   if (g_text_input && g_text_input->resource && g_input_panel_state != E_INPUT_PANEL_STATE_WILL_HIDE && g_input_panel_state != E_INPUT_PANEL_STATE_DID_HIDE)
+   if (g_text_input && g_text_input->resource &&
+       g_input_panel_state != E_INPUT_PANEL_STATE_WILL_HIDE && g_input_panel_state != E_INPUT_PANEL_STATE_DID_HIDE &&
+       g_updated_geometry)
      {
+        /* The geometry of E_Client may not be valid when IME is shown.
+           Assume E_Client has a valid geometry when this callback is called after IME has set the size.
+        */
         if (e_input_panel_client_geometry_get(NULL, &x, &y, &w, &h) && !(w <= 1 || h <= 1))
           _e_text_input_send_input_panel_geometry(g_text_input->resource, x, y, w, h);
      }