From 10526de444b58ab4959d086538845303a06acfc1 Mon Sep 17 00:00:00 2001 From: nyorain Date: Mon, 19 Jun 2017 19:40:58 +0200 Subject: Fix furhter wayland backend issues --- backend/backend.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/backend.c') 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 #include #include +#include #include #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"); -- cgit v1.2.3 From e22626ef6ae4769f37972ccd161e9d029d60f497 Mon Sep 17 00:00:00 2001 From: nyorain Date: Mon, 19 Jun 2017 22:39:20 +0200 Subject: Adapt codestyle --- backend/backend.c | 2 +- backend/wayland/backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/backend.c') diff --git a/backend/backend.c b/backend/backend.c index 087696ec..30ced3e8 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -43,7 +43,7 @@ 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")) { + if (getenv("WAYLAND_DISPLAY") || getenv("_WAYLAND_DISPLAY")) { return wlr_wl_backend_create(display, 1); } struct wlr_udev *udev; diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index 41fc7aad..6d3e2f32 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -35,7 +35,7 @@ static bool wlr_wl_backend_init(struct wlr_backend_state* state) { } wlr_egl_init(&state->egl, EGL_PLATFORM_WAYLAND_KHR, state->remote_display); - for(size_t i = 0; i < state->num_outputs; ++i) { + for (size_t i = 0; i < state->num_outputs; ++i) { if(!(state->outputs[i] = wlr_wl_output_create(state, i))) { wlr_log_errno(L_ERROR, "Failed to create %zuth output", i); return false; -- cgit v1.2.3