aboutsummaryrefslogtreecommitdiff
path: root/backend/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-12 16:14:18 -0500
committerGitHub <noreply@github.com>2018-11-12 16:14:18 -0500
commit77dfac4fa4082ce95fc9769861e0b971754b6a66 (patch)
treecfffb364f9e79dc7acb2dc67075b33f15a1f57c9 /backend/backend.c
parentd2d8372cdc20c908342497fcdbfa91b6fc99df82 (diff)
parent51bfdd620e70c41e1a9fb4ce7831eddfb1bf893b (diff)
Merge pull request #1372 from emersion/config10
Use #if instead of #ifdef for wlroots config data
Diffstat (limited to 'backend/backend.c')
-rw-r--r--backend/backend.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/backend/backend.c b/backend/backend.c
index c5dcdb48..b369a135 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -17,8 +17,7 @@
#include <wlr/util/log.h>
#include "backend/multi.h"
-/* WLR_HAS_X11_BACKEND needs to be after wlr/config.h */
-#ifdef WLR_HAS_X11_BACKEND
+#if WLR_HAS_X11_BACKEND
#include <wlr/backend/x11.h>
#endif
@@ -102,7 +101,7 @@ static struct wlr_backend *attempt_wl_backend(struct wl_display *display,
return backend;
}
-#ifdef WLR_HAS_X11_BACKEND
+#if WLR_HAS_X11_BACKEND
static struct wlr_backend *attempt_x11_backend(struct wl_display *display,
const char *x11_display, wlr_renderer_create_func_t create_renderer_func) {
struct wlr_backend *backend = wlr_x11_backend_create(display, x11_display, create_renderer_func);
@@ -165,7 +164,7 @@ static struct wlr_backend *attempt_backend_by_name(struct wl_display *display,
const char *name, wlr_renderer_create_func_t create_renderer_func) {
if (strcmp(name, "wayland") == 0) {
return attempt_wl_backend(display, create_renderer_func);
-#ifdef WLR_HAS_X11_BACKEND
+#if WLR_HAS_X11_BACKEND
} else if (strcmp(name, "x11") == 0) {
return attempt_x11_backend(display, NULL, create_renderer_func);
#endif
@@ -248,7 +247,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
}
}
-#ifdef WLR_HAS_X11_BACKEND
+#if WLR_HAS_X11_BACKEND
const char *x11_display = getenv("DISPLAY");
if (x11_display) {
struct wlr_backend *x11_backend =