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 <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2021-05-10 12:34:12 +03:00 committed by Pekka Paalanen
parent 529fae91f7
commit bc7c8332df

View file

@ -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;
}