diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 6f2e989d7..19da0217f 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2382,7 +2382,12 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) ec->parent->lock_close = EINA_FALSE; ec->parent->modal = NULL; } - _e_comp_wl_keyboard_leave(ec); + + /* FIXME: We should probably test if ec really has keyboard + * focus, but this at least catches GTK's silly habit of creating + * a surface, never attaching anything to it, then deleting it. + */ + if (ec->visible)_e_comp_wl_keyboard_leave(ec); wl_signal_emit(&ec->comp_data->destroy_signal, &ec->comp_data->surface);