Modified to prevent sending invalid geometry to app 60/227560/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:38:58 +0000 (00:38 +0000)
Change-Id: I05f91c40018ab8bda3c8fe90e48fb7e03b18c15f
(cherry picked from commit eb6ea7d0108c3f1f633e9d064de3f1a1e88a5b13)

src/e_mod_main.c

index 76c4cbc3c4de337bd16d6cacac7bf324bd7f0599..aa90d6521b273295d16c74f7f018577e3f985d42 100644 (file)
@@ -2337,9 +2337,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;
@@ -2359,6 +2371,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.
         */