diff options
author | emersion <contact@emersion.fr> | 2017-11-16 09:33:47 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-16 09:33:47 +0100 |
commit | 73c48f2f35ffea2f4fb03f54e652559be4bfe658 (patch) | |
tree | 9586522c3e0c3d810f7d79de5c5a0889642458d4 /backend | |
parent | ac78c6642a1c742c896f08282ee31c4f0d3acd51 (diff) |
Terminate local display on remote Wayland display error
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/backend.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index 532935b8..bfc73e05 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -12,10 +12,15 @@ #include "backend/wayland.h" #include "xdg-shell-unstable-v6-client-protocol.h" - static int dispatch_events(int fd, uint32_t mask, void *data) { struct wlr_wl_backend *backend = data; int count = 0; + + if ((mask & WL_EVENT_HANGUP) || (mask & WL_EVENT_ERROR)) { + wl_display_terminate(backend->local_display); + return 0; + } + if (mask & WL_EVENT_READABLE) { count = wl_display_dispatch(backend->remote_display); } |