compositor-wayland: Handle HUP or ERR from event loop

Otherwise we end up in a busy loop instead of exiting nicely.
dev
Kristian Høgsberg 11 years ago
parent a28ba55b56
commit 453de7a7e5
  1. 5
      src/compositor-wayland.c

@ -684,6 +684,11 @@ wayland_compositor_handle_event(int fd, uint32_t mask, void *data)
struct wayland_compositor *c = data;
int count = 0;
if ((mask & WL_EVENT_HANGUP) || (mask & WL_EVENT_ERROR)) {
wl_display_terminate(c->base.wl_display);
return 0;
}
if (mask & WL_EVENT_READABLE)
count = wl_display_dispatch(c->parent.wl_display);
if (mask & WL_EVENT_WRITABLE)

Loading…
Cancel
Save