return EINA_FALSE;
}
+/* If ec is NULL, it will check the very first item that is found in our surfaces list */
+Eina_Bool
+e_input_panel_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h)
+{
+ E_Input_Panel_Surface *ips;
+ Eina_List *l;
+
+ if (!g_input_panel) return EINA_FALSE;
+ if (!x || !y || !w || !h) return EINA_FALSE;
+
+ EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
+ {
+ if (!ips->ec) continue;
+ if (ips->ec == ec || !ec) {
+ *x = ips->ec->x;
+ *y = ips->ec->y;
+ *w = ips->ec->w;
+ *h = ips->ec->h;
+ return EINA_TRUE;
+ }
+ }
+
+ return EINA_FALSE;
+}
+
Eina_Bool
e_input_panel_init(void)
{
text_input->input_panel_visibile = EINA_FALSE;
if (text_input->resource)
- wl_text_input_send_input_panel_state(text_input->resource,
- WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE);
+ {
+ wl_text_input_send_input_panel_geometry(text_input->resource, 0, 0, 0, 0);
+ wl_text_input_send_input_panel_state(text_input->resource, WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE);
+ }
if (force_hide)
{
text_input->input_panel_visibile = EINA_FALSE;
- if (text_input->resource)
- wl_text_input_send_input_panel_state(text_input->resource,
- WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE);
-
if (g_text_input && g_text_input->resource && g_client)
_input_panel_hide(g_client, g_text_input->resource, EINA_FALSE);
g_input_panel_state = E_INPUT_PANEL_STATE_WILL_SHOW;
if (text_input->resource)
- wl_text_input_send_input_panel_state(text_input->resource,
- WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW);
+ {
+ int x = 0, y = 0, w = 0, h = 0;
+ if (e_input_panel_client_geometry_get(NULL, &x, &y, &w, &h))
+ wl_text_input_send_input_panel_geometry(text_input->resource, x, y, w, h);
+
+ wl_text_input_send_input_panel_state(text_input->resource, WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW);
+ }
e_input_panel_transient_for_set(client_surface_ec);
}
void e_input_panel_shutdown(void);
void e_input_panel_visibility_change(Eina_Bool visible);
Eina_Bool e_input_panel_client_find(E_Client *ec);
+Eina_Bool e_input_panel_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h);
EINTERN void e_input_panel_wait_update_set(Eina_Bool wait_update);
EINTERN void e_input_panel_transient_for_set(E_Client *parent);