From bc7c8332dfc74db6c6045198b567ba24db5a6454 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 10 May 2021 12:34:12 +0300 Subject: [PATCH] backend-wayland: Avoid spinning forever if dispatching failed As observed in #420 (Running Weston under Weston's kiosk shell with multiple outputs causes the scrollback to go nuts), not being able to cope with (a correct) resize of the parent surface would cause the client weston instance to spin forever. If dispatching failed, just exit. Fixes #420 Signed-off-by: Marius Vlad --- libweston/backend-wayland/wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libweston/backend-wayland/wayland.c b/libweston/backend-wayland/wayland.c index 68a4ff1a..152c9ca1 100644 --- a/libweston/backend-wayland/wayland.c +++ b/libweston/backend-wayland/wayland.c @@ -2627,6 +2627,11 @@ wayland_backend_handle_event(int fd, uint32_t mask, void *data) wl_display_flush(b->parent.wl_display); } + if (count < 0) { + weston_compositor_exit(b->compositor); + return 0; + } + return count; }