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:
@@ -684,6 +684,11 @@ wayland_compositor_handle_event(int fd, uint32_t mask, void *data)
|
|||||||
struct wayland_compositor *c = data;
|
struct wayland_compositor *c = data;
|
||||||
int count = 0;
|
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)
|
if (mask & WL_EVENT_READABLE)
|
||||||
count = wl_display_dispatch(c->parent.wl_display);
|
count = wl_display_dispatch(c->parent.wl_display);
|
||||||
if (mask & WL_EVENT_WRITABLE)
|
if (mask & WL_EVENT_WRITABLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user