backend: stop calling wl_display_terminate()

Leave it up to the compositor to decide what to do when a backend
becomes unavailable.
This commit is contained in:
Simon Ser 2023-10-31 20:33:03 +01:00 committed by Kirill Primak
parent 4ad6e6c298
commit 3cc4374542
4 changed files with 6 additions and 6 deletions

View File

@ -1790,7 +1790,7 @@ int handle_drm_event(int fd, uint32_t mask, void *data) {
if (drmHandleEvent(fd, &event) != 0) {
wlr_log(WLR_ERROR, "drmHandleEvent failed");
wl_display_terminate(drm->display);
wlr_backend_destroy(&drm->backend);
}
return 1;
}

View File

@ -51,7 +51,7 @@ static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
int ret = libinput_dispatch(backend->libinput_context);
if (ret != 0) {
wlr_log(WLR_ERROR, "Failed to dispatch libinput: %s", strerror(-ret));
wl_display_terminate(backend->display);
wlr_backend_destroy(&backend->backend);
return 0;
}
struct libinput_event *event;

View File

@ -59,7 +59,7 @@ static int dispatch_events(int fd, uint32_t mask, void *data) {
if (mask & WL_EVENT_ERROR) {
wlr_log(WLR_ERROR, "Failed to read from remote Wayland display");
}
wl_display_terminate(wl->local_display);
wlr_backend_destroy(&wl->backend);
return 0;
}
@ -77,7 +77,7 @@ static int dispatch_events(int fd, uint32_t mask, void *data) {
if (count < 0) {
wlr_log(WLR_ERROR, "Failed to dispatch remote Wayland display");
wl_display_terminate(wl->local_display);
wlr_backend_destroy(&wl->backend);
return 0;
}
return count;

View File

@ -132,7 +132,7 @@ static int x11_event(int fd, uint32_t mask, void *data) {
if (mask & WL_EVENT_ERROR) {
wlr_log(WLR_ERROR, "Failed to read from X11 server");
}
wl_display_terminate(x11->wl_display);
wlr_backend_destroy(&x11->backend);
return 0;
}
@ -145,7 +145,7 @@ static int x11_event(int fd, uint32_t mask, void *data) {
int ret = xcb_connection_has_error(x11->xcb);
if (ret != 0) {
wlr_log(WLR_ERROR, "X11 connection error (%d)", ret);
wl_display_terminate(x11->wl_display);
wlr_backend_destroy(&x11->backend);
}
return 0;