compositor-wayland: Handle HUP or ERR from event loop

Otherwise we end up in a busy loop instead of exiting nicely.
This commit is contained in:
Kristian Høgsberg 2013-10-30 23:15:44 -07:00
parent a28ba55b56
commit 453de7a7e5

View file

@ -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)