diff --git a/src/modules/illume2/e_mod_kbd.c b/src/modules/illume2/e_mod_kbd.c index 2f0ae0b58..d38c0c63d 100644 --- a/src/modules/illume2/e_mod_kbd.c +++ b/src/modules/illume2/e_mod_kbd.c @@ -17,6 +17,7 @@ static int _e_mod_kbd_cb_animate(void *data __UNUSED__); static E_Illume_Keyboard *_e_mod_kbd_by_border_get(E_Border *bd); static void _e_mod_kbd_border_adopt(E_Border *bd); static void _e_mod_kbd_layout_send(void); +static void _e_mod_kbd_geometry_send(void); /* local variables */ static Eina_List *_kbd_hdls = NULL; @@ -519,6 +520,7 @@ _e_mod_kbd_cb_animate(void *data __UNUSED__) _e_illume_kbd->visible = 1; _e_mod_kbd_layout_send(); + _e_mod_kbd_geometry_send(); /* tell the focused border it changed so layout gets udpated */ if (_focused_border) @@ -611,3 +613,25 @@ _e_mod_kbd_layout_send(void) if (_e_illume_kbd->border) ecore_x_e_virtual_keyboard_state_send(_e_illume_kbd->border->client.win, type); } + +static void +_e_mod_kbd_geometry_send(void) +{ + E_Zone *zone; + int y = 0; + + /* make sure we have a keyboard border */ + if (!_e_illume_kbd->border) return; + + /* adjust Y for keyboard visibility */ + if (_e_illume_kbd->border->fx.y <= 0) + y = _e_illume_kbd->border->y; + + if (_focused_border) zone = _focused_border->zone; + else zone = _e_illume_kbd->border->zone; + + ecore_x_e_illume_keyboard_geometry_set(zone->black_win, + _e_illume_kbd->border->x, y, + _e_illume_kbd->border->w, + _e_illume_kbd->border->h); +} diff --git a/src/modules/illume2/policies/illume/policy.c b/src/modules/illume2/policies/illume/policy.c index 1dba80cf9..1b538646c 100644 --- a/src/modules/illume2/policies/illume/policy.c +++ b/src/modules/illume2/policies/illume/policy.c @@ -1591,6 +1591,31 @@ _policy_property_change(Ecore_X_Event_Window_Property *event) ecore_x_e_illume_softkey_geometry_set(bd->client.win, x, y, w, h); } } + else if (event->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY) + { + Eina_List *l; + E_Zone *zone; + E_Border *bd; + int x, y, w, h; + + /* make sure this property changed on a zone */ + if (!(zone = e_util_zone_window_find(event->win))) return; + + /* get the geometry. This is X round-trip :( */ + ecore_x_e_illume_keyboard_geometry_get(zone->black_win, &x, &y, &w, &h); + + /* look for conformant borders */ + EINA_LIST_FOREACH(e_border_client_list(), l, bd) + { + if (bd->zone != zone) continue; + if (!e_illume_border_is_conformant(bd)) continue; + /* set keyboard geometry on conformant window */ + /* NB: This is needed so that conformant apps get told about + * the keyboard size/position...else they have no way of + * knowing that the geometry has been updated */ + ecore_x_e_illume_keyboard_geometry_set(bd->client.win, x, y, w, h); + } + } else if (!strcmp(ecore_x_atom_name_get(event->atom), "ENLIGHTENMENT_SCALE")) { Eina_List *ml;