From 533a36f05a46472a29700df47100a4c5c59c5f29 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 4 Feb 2021 23:16:35 +0100 Subject: backend/x11: drop x11-xcb dependency We don't need it anymore now that we've stopped using the EGL Xlib platform. --- backend/x11/backend.c | 20 ++++---------------- backend/x11/meson.build | 1 - 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'backend') diff --git a/backend/x11/backend.c b/backend/x11/backend.c index 482524c9..aa9ccd09 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -197,10 +196,7 @@ static void backend_destroy(struct wlr_backend *backend) { #endif close(x11->drm_fd); - - if (x11->xlib_conn) { - XCloseDisplay(x11->xlib_conn); - } + xcb_disconnect(x11->xcb); free(x11); } @@ -393,20 +389,12 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, x11->wl_display = display; wl_list_init(&x11->outputs); - x11->xlib_conn = XOpenDisplay(x11_display); - if (!x11->xlib_conn) { - wlr_log(WLR_ERROR, "Failed to open X connection"); - goto error_x11; - } - - x11->xcb = XGetXCBConnection(x11->xlib_conn); + x11->xcb = xcb_connect(x11_display, NULL); if (!x11->xcb || xcb_connection_has_error(x11->xcb)) { wlr_log(WLR_ERROR, "Failed to open xcb connection"); - goto error_display; + goto error_x11; } - XSetEventQueueOwner(x11->xlib_conn, XCBOwnsEventQueue); - struct { const char *name; xcb_intern_atom_cookie_t cookie; @@ -668,7 +656,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, error_event: wl_event_source_remove(x11->event_source); error_display: - XCloseDisplay(x11->xlib_conn); + xcb_disconnect(x11->xcb); error_x11: free(x11); return NULL; diff --git a/backend/x11/meson.build b/backend/x11/meson.build index b9f22a4a..206e9042 100644 --- a/backend/x11/meson.build +++ b/backend/x11/meson.build @@ -1,6 +1,5 @@ x11_libs = [] x11_required = [ - 'x11-xcb', 'xcb', 'xcb-dri3', 'xcb-present', -- cgit v1.2.3