Modified to not send previous IME geometry to app 78/222678/3
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:20:38 +0000 (17:20 +0900)
Change-Id: Ib74df9abeea411e180d61e9834abf28b3b462f38

src/e_mod_main.c

index b64d2b2e64f94f88109caa1a397d33eb9e064073..8be79922ada30768e2e7242a2e832d58c0a96473 100644 (file)
@@ -2324,8 +2324,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);
      }