From de66bdb8679de14377306b7a903f2bc5d62fd169 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Sun, 13 Aug 2017 23:05:57 +0200 Subject: Add backend detection functions Resolves #80 --- backend/libinput/backend.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/libinput') diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 44a1a4a9..18e4826c 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -103,6 +103,10 @@ static struct wlr_backend_impl backend_impl = { .destroy = wlr_libinput_backend_destroy }; +bool wlr_backend_is_libinput(struct wlr_backend *b) { + return b->impl == &backend_impl; +} + static void session_signal(struct wl_listener *listener, void *data) { struct wlr_libinput_backend *backend = wl_container_of(listener, backend, session_signal); struct wlr_session *session = data; -- cgit v1.2.3