Modified to change the position of floating keyboard immediately 71/198271/1
authorInhong Han <inhong1.han@samsung.com>
Tue, 22 Jan 2019 11:16:58 +0000 (20:16 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 23 Jan 2019 07:20:55 +0000 (07:20 +0000)
Change-Id: I0ffd16afef8ef81bfaf12715101e38e4cfee9594
(cherry picked from commit f2fe521f15be90297e04d4b95a559106a6e79208)

src/e_mod_input_panel.c
src/e_mod_main.c
src/e_mod_main.h

index 939d34a..011cafa 100644 (file)
@@ -1288,11 +1288,26 @@ e_input_panel_show_need_rerun_set(Eina_Bool need_rerun)
 }
 
 void
-e_input_panel_floating_position_set(E_Client *ec, int x, int y)
+e_input_panel_floating_position_set(int x, int y)
 {
-   if (!ec || !g_floating_info) return;
+   E_Client *floating_ec = NULL;
+   E_Input_Panel_Surface *ips;
+   Eina_List *l;
+   Eina_List *l_next;
 
-   switch (ec->e.state.rot.ang.curr)
+   EINA_LIST_FOREACH_SAFE(g_input_panel->surfaces, l, l_next, ips)
+     {
+        if (!ips->ec) continue;
+        if (ips->ec->frame && ips->ec->vkbd.floating)
+          {
+             floating_ec = ips->ec;
+             break;
+          }
+     }
+
+   if (!floating_ec || !g_floating_info) return;
+
+   switch (floating_ec->e.state.rot.ang.curr)
      {
         case 90:
         case 270:
@@ -1308,6 +1323,8 @@ e_input_panel_floating_position_set(E_Client *ec, int x, int y)
            g_floating_info->init_portrait_position = EINA_TRUE;
            break;
      }
+
+   _e_input_panel_position_set(floating_ec, floating_ec->client.w, floating_ec->client.h);
 }
 
 Eina_Bool
index d529719..239121d 100644 (file)
@@ -1975,7 +1975,7 @@ _e_text_input_cb_input_panel_position_set(struct wl_client *client EINA_UNUSED,
                     "No Text Input For Resource");
         return;
      }
-   e_input_panel_floating_position_set(client_surface_ec, x, y);
+   e_input_panel_floating_position_set(x, y);
 }
 
 static void
index acf2255..2c7ac23 100644 (file)
@@ -20,7 +20,7 @@ E_Client   *e_text_input_client_surface_get(void);
 EINTERN void   e_input_panel_wait_update_set(Eina_Bool wait_update);
 EINTERN void   e_input_panel_transient_for_set(E_Client *parent);
 void        e_input_panel_show_need_rerun_set(Eina_Bool need_rerun);
-void        e_input_panel_floating_position_set(E_Client *ec, int x, int y);
+void        e_input_panel_floating_position_set(int x, int y);
 void        e_text_input_update_input_panel_state(Eina_Bool state);
 Eina_Bool   e_input_panel_surface_destroy(E_Client *ec);