Commit c5e4d344 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz Committed by Carsten Haitzler (Rasterman)

efl-wl: fix no-op of setting keyboard enter on already-entered surface

@fix
parent 58dd14ff
......@@ -1089,11 +1089,13 @@ comp_seats_redo_enter(Comp *c, Comp_Surface *cs)
{
Eina_List *l, *ll;
struct wl_resource *res;
if (c->active_surface && (cs != c->active_surface))
Eina_Bool same = s->kbd.enter == cs;
if (c->active_surface && (!same))
{
l = seat_kbd_active_resources_get(s);
EINA_LIST_FOREACH(l, ll, res)
wl_keyboard_send_leave(res, serial, c->active_surface->res);
wl_keyboard_send_leave(res, serial, s->kbd.enter->res);
}
s->active_client = client;
if (cs)
......@@ -1101,12 +1103,13 @@ comp_seats_redo_enter(Comp *c, Comp_Surface *cs)
l = seat_kbd_active_resources_get(s);
EINA_LIST_FOREACH(l, ll, res)
{
wl_keyboard_send_enter(res, serial, cs->res, &s->kbd.keys);
if (!same)
wl_keyboard_send_enter(res, serial, cs->res, &s->kbd.keys);
comp_seat_send_modifiers(s, res, serial);
}
}
s->kbd.enter = cs;
if (s->kbd.enter && s->selection_source)
if (s->kbd.enter && s->selection_source && (!same))
comp_seat_kbd_data_device_enter(s);
}
c->active_surface = cs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment