aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-10-31 20:33:03 +0100
committerKirill Primak <vyivel@eclair.cafe>2024-01-25 14:58:00 +0300
commit3cc43745421efda2090e74d14b6345103ef241d4 (patch)
tree2509f2a3173c941db21270c798187a13b525098b /backend
parent4ad6e6c2983216e91cec9987191c1099e8a108a8 (diff)
backend: stop calling wl_display_terminate()
Leave it up to the compositor to decide what to do when a backend becomes unavailable.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c2
-rw-r--r--backend/libinput/backend.c2
-rw-r--r--backend/wayland/backend.c4
-rw-r--r--backend/x11/backend.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 9c4f569c..e62dd638 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -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;
}
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index cbdf8b72..35a86583 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -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;
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index 0bd75610..ebf36a8b 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -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;
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 5c5aa7e8..c650712f 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -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;