From aac620c768a61f79765c8fe79a0bd250785c7d71 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sun, 26 Apr 2020 11:28:22 -0500 Subject: [PATCH] extra x11 output --- dwl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dwl.c b/dwl.c index 949f370..b5caa1d 100644 --- a/dwl.c +++ b/dwl.c @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -1101,6 +1104,15 @@ setmfact(const Arg *arg) selmon->mfact = f; } +static void +add_x11_output(struct wlr_backend *sub, void *data) +{ + if (wlr_backend_is_x11(sub)) { + wlr_log(WLR_INFO, "multi: x11 backend"); + wlr_x11_output_create(sub); + } +} + void setup(void) { @@ -1114,6 +1126,14 @@ setup(void) * don't). */ backend = wlr_backend_autocreate(dpy, NULL); + if (wlr_backend_is_x11(backend)) { + wlr_log(WLR_INFO, "x11 backend"); + wlr_x11_output_create(backend); + } else if (wlr_backend_is_multi(backend)) { + wlr_log(WLR_INFO, "multi backend"); + wlr_multi_for_each_backend(backend, add_x11_output, NULL); + } + /* If we don't provide a renderer, autocreate makes a GLES2 renderer for us. * The renderer is responsible for defining the various pixel formats it * supports for shared memory, this configures that for clients. */