From 6b56ae68e5476bdda00a6c5f4e2311a13b3d12cc Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 29 Sep 2023 18:04:49 +0200 Subject: [PATCH] xwayland: Give up on EI on setup failure If we fail to setup EI, give up on using EI for XTEST and restore the default XTEST handlers. This happens when neither the portal nor the socket backends are usable. This does not affect the portal operation though, if the user choose not to allow a particular client, Xwayland would continue to use EI. Signed-off-by: Olivier Fourdan Reviewed-by: Joshua Ashton --- hw/xwayland/xwayland-xtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xwayland/xwayland-xtest.c b/hw/xwayland/xwayland-xtest.c index 74778ce8b..69686daab 100644 --- a/hw/xwayland/xwayland-xtest.c +++ b/hw/xwayland/xwayland-xtest.c @@ -387,6 +387,8 @@ setup_ei(ClientPtr client) xwl_ei_client = NULL; ei_unref(ei); error_ei("EI setup failed\n"); + /* We failed to setup EI using either backends, give up on EI. */ + xwayland_restore_xtest(); } out: