Modified to get a valid agnle when the position of the input panel is set by app 14/215414/3
authorInHong Han <inhong1.han@samsung.com>
Tue, 8 Oct 2019 03:22:07 +0000 (12:22 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 8 Oct 2019 04:21:41 +0000 (13:21 +0900)
Change-Id: I6faa5bb2c600810e17df89adeb61fc3e79174036

src/e_mod_input_panel.c

index 2ae3960..a70e4e6 100644 (file)
@@ -714,8 +714,10 @@ _e_input_panel_client_cb_rotation_change_end(void *data, int type, void *event)
    if (ec != ips->ec)
      goto end;
 
-   if (ips->showing)
-     _e_input_panel_position_set(ec, ec->client.w, ec->client.h);
+   if (ips->showing) {
+      LOGD("current angle : %d", ec->e.state.rot.ang.curr);
+      _e_input_panel_position_set(ec, ec->client.w, ec->client.h);
+   }
 
 end:
    return ECORE_CALLBACK_PASS_ON;
@@ -745,6 +747,7 @@ _e_ips_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *e
 
    evas_object_geometry_get(obj, NULL, NULL, &w, &h);
 
+   LOGD("current angle : %d", ec->e.state.rot.ang.curr);
    _e_input_panel_position_set(ec, w, h);
 }
 
@@ -1330,7 +1333,9 @@ e_input_panel_show_need_rerun_set(Eina_Bool need_rerun)
 void
 e_input_panel_floating_position_set(int x, int y)
 {
+   int cur_angle;
    E_Client *floating_ec = NULL;
+   E_Input_Panel_Surface *floating_ips;
    E_Input_Panel_Surface *ips;
    Eina_List *l;
    Eina_List *l_next;
@@ -1341,13 +1346,20 @@ e_input_panel_floating_position_set(int x, int y)
         if (ips->ec->frame && ips->ec->vkbd.floating)
           {
              floating_ec = ips->ec;
+             floating_ips = ips;
              break;
           }
      }
 
-   if (!floating_ec || !g_floating_info) return;
+   if (!floating_ec || !floating_ips || !g_floating_info) return;
 
-   switch (floating_ec->e.state.rot.ang.curr)
+   if(floating_ips->showing)
+      cur_angle = floating_ec->e.state.rot.ang.curr;
+   else
+      cur_angle = floating_ec->zone->rot.curr;
+
+   LOGD("current angle : %d", cur_angle);
+   switch (cur_angle)
      {
         case 90:
         case 270:
@@ -1364,7 +1376,8 @@ e_input_panel_floating_position_set(int x, int y)
            break;
      }
 
-   _e_input_panel_position_set(floating_ec, floating_ec->client.w, floating_ec->client.h);
+   if(floating_ips->showing)
+      _e_input_panel_position_set(floating_ec, floating_ec->client.w, floating_ec->client.h);
 }
 
 Eina_Bool