aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/input_device.c4
-rw-r--r--backend/headless/output.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/backend/headless/input_device.c b/backend/headless/input_device.c
index 05def775..5c62e87f 100644
--- a/backend/headless/input_device.c
+++ b/backend/headless/input_device.c
@@ -19,6 +19,10 @@ static struct wlr_input_device_impl input_device_impl = {
.destroy = input_device_destroy,
};
+bool wlr_input_device_is_headless(struct wlr_input_device *wlr_dev) {
+ return wlr_dev->impl == &input_device_impl;
+}
+
struct wlr_input_device *wlr_headless_add_input_device(
struct wlr_backend *wlr_backend, enum wlr_input_device_type type) {
struct wlr_headless_backend *backend =
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 9c4ba35e..511c2c53 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -82,6 +82,10 @@ static const struct wlr_output_impl output_impl = {
.swap_buffers = output_swap_buffers,
};
+bool wlr_output_is_headless(struct wlr_output *wlr_output) {
+ return wlr_output->impl == &output_impl;
+}
+
static int signal_frame(void *data) {
struct wlr_headless_output *output = data;
wl_signal_emit(&output->wlr_output.events.frame, &output->wlr_output);