Modified to prevent sending invalid geometry to app 59/227559/1
authorInHong Han <inhong1.han@samsung.com>
Thu, 12 Mar 2020 10:17:58 +0000 (19:17 +0900)
committerInHong Han <inhong1.han@samsung.com>
Fri, 13 Mar 2020 00:37:56 +0000 (00:37 +0000)
Change-Id: I05f91c40018ab8bda3c8fe90e48fb7e03b18c15f
(cherry picked from commit eb6ea7d0108c3f1f633e9d064de3f1a1e88a5b13)

src/e_mod_main.c

index 8be79922ada30768e2e7242a2e832d58c0a96473..bece36611a8200179630fe1078ddcdaf560f707f 100644 (file)
@@ -2306,9 +2306,21 @@ _e_mod_eeze_udev_watch_cb(const char *text, Eeze_Udev_Event event, void *data, E
      set_soft_keyboard_mode();
 }
 
+static Eina_Bool
+e_client_rotation_is_progress(E_Client *ec)
+{
+   if (!ec) return EINA_TRUE;
+
+   if (ec->e.state.rot.ang.next == -1)
+     return EINA_FALSE;
+   else
+     return EINA_TRUE;
+}
+
 static Eina_Bool
 _e_text_input_method_context_cb_client_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
+   LOGD("");
    E_Event_Client *ev;
    E_Client *ec;
    Eina_Bool found;
@@ -2328,6 +2340,12 @@ _e_text_input_method_context_cb_client_resize(void *data EINA_UNUSED, int type E
        g_input_panel_state != E_INPUT_PANEL_STATE_WILL_HIDE && g_input_panel_state != E_INPUT_PANEL_STATE_DID_HIDE &&
        g_updated_geometry)
      {
+        if (e_client_rotation_is_progress(ec))
+          {
+             LOGD("Rotation is not finished");
+             return ECORE_CALLBACK_PASS_ON;
+          }
+
         /* 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.
         */