From 60617c82d7734f34409ecf61492cbc57da1b3d01 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 30 Nov 2016 14:46:36 -0600 Subject: [PATCH] More aggressively prune keyboard focus list Even if a client is deleted we still need to get its resources off the keyboard focus list. --- src/bin/e_comp_wl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 7d8ae247c..c53c6dee3 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -679,14 +679,12 @@ static void _e_comp_wl_keyboard_leave(E_Client *ec) { struct wl_resource *res; - struct wl_client *wc; Eina_List *l, *ll; uint32_t serial, *k; double t; if (!eina_list_count(e_comp_wl->kbd.resources)) return; if (!ec->comp_data) return; - if (!ec->comp_data->surface) return; if (ec->comp_data->is_xdg_surface) { @@ -701,16 +699,15 @@ _e_comp_wl_keyboard_leave(E_Client *ec) while (ec->parent) ec = ec->parent; } - wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp); t = ecore_time_unix_get(); EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res) { - if (wl_resource_get_client(res) != wc) continue; wl_array_for_each(k, &e_comp_wl->kbd.keys) wl_keyboard_send_key(res, serial, t, *k, WL_KEYBOARD_KEY_STATE_RELEASED); - wl_keyboard_send_leave(res, serial, ec->comp_data->surface); + if (ec->comp_data->surface) + wl_keyboard_send_leave(res, serial, ec->comp_data->surface); e_comp_wl->kbd.focused = eina_list_remove_list(e_comp_wl->kbd.focused, l); } }