mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
commit
b1c4f01bad
5 changed files with 50 additions and 26 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue