aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/x11/backend.c4
-rw-r--r--include/backend/x11.h1
-rw-r--r--include/wlr/backend/x11.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index f6f9cfa8..0d0eaa5b 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -401,3 +401,7 @@ static struct wlr_output_impl output_impl = {
.make_current = output_make_current,
.swap_buffers = output_swap_buffers,
};
+
+bool wlr_output_is_x11(struct wlr_output *wlr_output) {
+ return wlr_output->impl == &output_impl;
+}
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 31a5138b..b845a41a 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -6,7 +6,6 @@
#include <X11/Xlib-xcb.h>
#include <wayland-server.h>
#include <wlr/render/egl.h>
-#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_input_device.h>
struct wlr_x11_backend;
diff --git a/include/wlr/backend/x11.h b/include/wlr/backend/x11.h
index 3901649b..667bfd15 100644
--- a/include/wlr/backend/x11.h
+++ b/include/wlr/backend/x11.h
@@ -4,10 +4,12 @@
#include <stdbool.h>
#include <wayland-server.h>
#include <wlr/backend.h>
+#include <wlr/types/wlr_output.h>
struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
const char *x11_display);
bool wlr_backend_is_x11(struct wlr_backend *backend);
+bool wlr_output_is_x11(struct wlr_output *output);
#endif