aboutsummaryrefslogtreecommitdiff
path: root/backend/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-20 17:54:33 -0400
committerGitHub <noreply@github.com>2017-06-20 17:54:33 -0400
commit33f2c66fca6e8a628fe3f36d1abacf87226042de (patch)
tree1381f243d1bb9df41691e2b92593a8495bb80f37 /backend/backend.c
parent2f03ea0a6bea6c099f148eb745a725ca77813885 (diff)
parentb9d36c8149536cff1aa229f59337dcfa2f70a37b (diff)
Merge pull request #17 from nyorain/wayland-backend
Basic Wayland backend
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..30ced3e8 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");