diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-12-19 20:17:47 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-12-19 20:17:47 +0100 |
commit | d9eaca6c9fa162c3b47ce61ecdeab4dc73620b0a (patch) | |
tree | 038afb2c0332460bfeea23f382e11f205e7e3c71 | |
parent | 995383b0490401494bf4999f46428b319e781820 (diff) |
headless backend: add wlr_output_is_headless
-rw-r--r-- | backend/headless/output.c | 4 | ||||
-rw-r--r-- | include/backend/headless.h | 1 | ||||
-rw-r--r-- | include/wlr/backend/headless.h | 2 |
3 files changed, 6 insertions, 1 deletions
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); diff --git a/include/backend/headless.h b/include/backend/headless.h index 91ff37dd..f1948c07 100644 --- a/include/backend/headless.h +++ b/include/backend/headless.h @@ -3,7 +3,6 @@ #include <wlr/backend/interface.h> #include <wlr/backend/headless.h> -#include <wlr/types/wlr_output.h> struct wlr_headless_backend { struct wlr_backend backend; diff --git a/include/wlr/backend/headless.h b/include/wlr/backend/headless.h index 2c25beb0..8995f7cb 100644 --- a/include/wlr/backend/headless.h +++ b/include/wlr/backend/headless.h @@ -3,6 +3,7 @@ #include <wlr/backend.h> #include <wlr/types/wlr_input_device.h> +#include <wlr/types/wlr_output.h> struct wlr_backend *wlr_headless_backend_create(struct wl_display *display); struct wlr_output *wlr_headless_add_output(struct wlr_backend *backend, @@ -11,5 +12,6 @@ struct wlr_input_device *wlr_headless_add_input_device( struct wlr_backend *backend, enum wlr_input_device_type type); bool wlr_backend_is_headless(struct wlr_backend *backend); bool wlr_input_device_is_headless(struct wlr_input_device *device); +bool wlr_output_is_headless(struct wlr_output *output); #endif |