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>
dev
Marius Vlad 4 years ago committed by Pekka Paalanen
parent 529fae91f7
commit bc7c8332df
  1. 5
      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); wl_display_flush(b->parent.wl_display);
} }
if (count < 0) {
weston_compositor_exit(b->compositor);
return 0;
}
return count; return count;
} }

Loading…
Cancel
Save