mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 01:48:00 +02:00
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:
parent
a28ba55b56
commit
453de7a7e5
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue