diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/backend.c | 4 | ||||
-rw-r--r-- | backend/meson.build | 5 | ||||
-rw-r--r-- | backend/x11/backend.c | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/backend/backend.c b/backend/backend.c index c67be617..02b0b9af 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -11,7 +11,9 @@ #include <wlr/backend/multi.h> #include <wlr/backend/session.h> #include <wlr/backend/wayland.h> +#ifdef WLR_HAS_X11_BACKEND #include <wlr/backend/x11.h> +#endif #include <wlr/util/log.h> void wlr_backend_init(struct wlr_backend *backend, @@ -94,6 +96,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) { } } +#ifdef WLR_HAS_X11_BACKEND const char *x11_display = getenv("DISPLAY"); if (x11_display) { struct wlr_backend *x11_backend = @@ -101,6 +104,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) { wlr_multi_backend_add(backend, x11_backend); return backend; } +#endif // Attempt DRM+libinput struct wlr_session *session = wlr_session_create(display); diff --git a/backend/meson.build b/backend/meson.build index c0ed76f1..a74ea024 100644 --- a/backend/meson.build +++ b/backend/meson.build @@ -24,7 +24,6 @@ backend_files = files( 'wayland/output.c', 'wayland/registry.c', 'wayland/wl_seat.c', - 'x11/backend.c', ) backend_deps = [ @@ -50,6 +49,10 @@ if conf_data.get('WLR_HAS_SYSTEMD', false) backend_deps += systemd endif +if conf_data.get('WLR_HAS_X11_BACKEND', false) + backend_files += files('x11/backend.c') +endif + if conf_data.get('WLR_HAS_ELOGIND', false) backend_files += files('session/logind.c') backend_deps += elogind diff --git a/backend/x11/backend.c b/backend/x11/backend.c index dd2c0a6e..36d72d9e 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -326,9 +326,6 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) { wl_event_source_remove(x11->frame_timer); wlr_egl_finish(&x11->egl); - if (x11->xcb_conn) { - xcb_disconnect(x11->xcb_conn); - } if (x11->xlib_conn) { XCloseDisplay(x11->xlib_conn); } @@ -428,7 +425,6 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, error_event: wl_event_source_remove(x11->event_source); error_x11: - xcb_disconnect(x11->xcb_conn); XCloseDisplay(x11->xlib_conn); free(x11); return NULL; |