diff options
author | emersion <contact@emersion.fr> | 2017-12-19 22:53:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 22:53:08 +0100 |
commit | 1a96ce0c53c84295d33b143e1b6cf02cb7017d50 (patch) | |
tree | c19713e52bb8931c9a5116e745104458bf5e4f29 /backend/headless | |
parent | 36d875136354b0f0438b1fe89d5ea897b113bd24 (diff) | |
parent | fcd7062542bec6f9ab247dbc63c6eead457006bf (diff) |
Merge pull request #505 from martinetd/io_is_foo
Add wlr_input_device_is_foo and wlr_output_is_bar functions
Diffstat (limited to 'backend/headless')
-rw-r--r-- | backend/headless/input_device.c | 4 | ||||
-rw-r--r-- | backend/headless/output.c | 4 |
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); |