aboutsummaryrefslogtreecommitdiff
path: root/backend/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/backend.c')
-rw-r--r--backend/backend.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/backend.c b/backend/backend.c
index 02fd7479..087696ec 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -8,6 +8,7 @@
#include <wlr/backend/interface.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/libinput.h>
+#include <wlr/backend/wayland.h>
#include <wlr/backend/multi.h>
#include "backend/libinput.h"
#include "backend/udev.h"
@@ -42,6 +43,9 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
struct wlr_session *session) {
// TODO: Choose the most appropriate backend for the situation
// Attempt DRM+libinput
+ if(getenv("WAYLAND_DISPLAY") || getenv("_WAYLAND_DISPLAY")) {
+ return wlr_wl_backend_create(display, 1);
+ }
struct wlr_udev *udev;
if (!(udev = wlr_udev_create(display))) {
wlr_log(L_ERROR, "Failed to start udev");