forked from enlightenment/enlightenment
Properly send kbd focus to xdg_shell popups
Oops, a client can have multiple top level windows.
ref f391a0fb67
This commit is contained in:
parent
b80f0bfef7
commit
963afc8fea
|
@ -627,14 +627,16 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
|
|||
wc = wl_resource_get_client(ec->comp_data->surface);
|
||||
if (ec->comp_data->is_xdg_surface)
|
||||
{
|
||||
/* We only send kbd focus to xdg top levels */
|
||||
while (ec->parent)
|
||||
{
|
||||
ec = ec->parent;
|
||||
|
||||
/* If an xdg shell popup's parent already has focus we don't
|
||||
* need to do anything more.
|
||||
*/
|
||||
EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)
|
||||
if (wl_resource_get_client(res) == wc) return;
|
||||
|
||||
/* We only kbd focus top level xdg */
|
||||
while (ec->parent) ec = ec->parent;
|
||||
if (ec->focused) return;
|
||||
}
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
|
||||
|
|
Loading…
Reference in New Issue