headless backend: add wlr_input_device_is_headless

This commit is contained in:
Dominique Martinet 2017-12-19 20:12:04 +01:00
parent be95147385
commit 995383b049
2 changed files with 5 additions and 0 deletions

View file

@ -19,6 +19,10 @@ static struct wlr_input_device_impl input_device_impl = {
.destroy = input_device_destroy, .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_input_device *wlr_headless_add_input_device(
struct wlr_backend *wlr_backend, enum wlr_input_device_type type) { struct wlr_backend *wlr_backend, enum wlr_input_device_type type) {
struct wlr_headless_backend *backend = struct wlr_headless_backend *backend =

View file

@ -10,5 +10,6 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *backend,
struct wlr_input_device *wlr_headless_add_input_device( struct wlr_input_device *wlr_headless_add_input_device(
struct wlr_backend *backend, enum wlr_input_device_type type); struct wlr_backend *backend, enum wlr_input_device_type type);
bool wlr_backend_is_headless(struct wlr_backend *backend); bool wlr_backend_is_headless(struct wlr_backend *backend);
bool wlr_input_device_is_headless(struct wlr_input_device *device);
#endif #endif