backend/x11: drop x11-xcb dependency

We don't need it anymore now that we've stopped using the EGL Xlib
platform.
master
Simon Ser 4 years ago
parent b9e9e0e133
commit 533a36f05a

@ -65,7 +65,6 @@ If you choose to enable X11 support:
* xcb-xinput * xcb-xinput
* xcb-image * xcb-image
* xcb-render * xcb-render
* x11-xcb
* xcb-errors (optional, for improved error reporting) * xcb-errors (optional, for improved error reporting)
* xcb-icccm (optional, for improved Xwayland introspection) * xcb-icccm (optional, for improved Xwayland introspection)

@ -12,7 +12,6 @@
#include <wlr/config.h> #include <wlr/config.h>
#include <drm_fourcc.h> #include <drm_fourcc.h>
#include <X11/Xlib-xcb.h>
#include <wayland-server-core.h> #include <wayland-server-core.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <xcb/dri3.h> #include <xcb/dri3.h>
@ -197,10 +196,7 @@ static void backend_destroy(struct wlr_backend *backend) {
#endif #endif
close(x11->drm_fd); close(x11->drm_fd);
xcb_disconnect(x11->xcb);
if (x11->xlib_conn) {
XCloseDisplay(x11->xlib_conn);
}
free(x11); free(x11);
} }
@ -393,20 +389,12 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
x11->wl_display = display; x11->wl_display = display;
wl_list_init(&x11->outputs); wl_list_init(&x11->outputs);
x11->xlib_conn = XOpenDisplay(x11_display); x11->xcb = xcb_connect(x11_display, NULL);
if (!x11->xlib_conn) {
wlr_log(WLR_ERROR, "Failed to open X connection");
goto error_x11;
}
x11->xcb = XGetXCBConnection(x11->xlib_conn);
if (!x11->xcb || xcb_connection_has_error(x11->xcb)) { if (!x11->xcb || xcb_connection_has_error(x11->xcb)) {
wlr_log(WLR_ERROR, "Failed to open xcb connection"); wlr_log(WLR_ERROR, "Failed to open xcb connection");
goto error_display; goto error_x11;
} }
XSetEventQueueOwner(x11->xlib_conn, XCBOwnsEventQueue);
struct { struct {
const char *name; const char *name;
xcb_intern_atom_cookie_t cookie; xcb_intern_atom_cookie_t cookie;
@ -668,7 +656,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
error_event: error_event:
wl_event_source_remove(x11->event_source); wl_event_source_remove(x11->event_source);
error_display: error_display:
XCloseDisplay(x11->xlib_conn); xcb_disconnect(x11->xcb);
error_x11: error_x11:
free(x11); free(x11);
return NULL; return NULL;

@ -1,6 +1,5 @@
x11_libs = [] x11_libs = []
x11_required = [ x11_required = [
'x11-xcb',
'xcb', 'xcb',
'xcb-dri3', 'xcb-dri3',
'xcb-present', 'xcb-present',

@ -5,7 +5,6 @@
#include <stdbool.h> #include <stdbool.h>
#include <X11/Xlib-xcb.h>
#include <wayland-server-core.h> #include <wayland-server-core.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <xcb/present.h> #include <xcb/present.h>
@ -69,7 +68,6 @@ struct wlr_x11_backend {
struct wl_display *wl_display; struct wl_display *wl_display;
bool started; bool started;
Display *xlib_conn;
xcb_connection_t *xcb; xcb_connection_t *xcb;
xcb_screen_t *screen; xcb_screen_t *screen;
xcb_depth_t *depth; xcb_depth_t *depth;

Loading…
Cancel
Save