From 3e228b0b2ac6fbeee544764aa1c3aa1e7e501af1 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Tue, 19 Dec 2017 19:46:30 +0100 Subject: libinput backend: add wlr_input_device_is_libinput --- backend/libinput/events.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/libinput') diff --git a/backend/libinput/events.c b/backend/libinput/events.c index c14aef01..758a9f25 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -53,6 +53,10 @@ static struct wlr_input_device *allocate_device( return wlr_dev; } +bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) { + return wlr_dev->impl == &input_device_impl; +} + static void handle_device_added(struct wlr_libinput_backend *backend, struct libinput_device *libinput_dev) { assert(backend && libinput_dev); -- cgit v1.2.3