From 6cd5c3d245ec53239ebf4023af75b7d580d24722 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 12 Jul 2022 23:03:44 +0000 Subject: [PATCH] set seat capability for touch --- kiwmi/include/input/input.h | 1 + kiwmi/kiwmi/input/input.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/kiwmi/include/input/input.h b/kiwmi/include/input/input.h index cbaa60d..0fd7e81 100644 --- a/kiwmi/include/input/input.h +++ b/kiwmi/include/input/input.h @@ -15,6 +15,7 @@ struct kiwmi_input { struct wl_listener new_input; struct kiwmi_cursor *cursor; struct kiwmi_seat *seat; + int touchpads; struct { struct wl_signal keyboard_new; diff --git a/kiwmi/kiwmi/input/input.c b/kiwmi/kiwmi/input/input.c index f0530f2..a89f044 100644 --- a/kiwmi/kiwmi/input/input.c +++ b/kiwmi/kiwmi/input/input.c @@ -32,6 +32,7 @@ static void new_touch(struct kiwmi_input *input, struct wlr_input_device *device) { wlr_cursor_attach_input_device(input->cursor->cursor, device); + input->touchpads++; } static void @@ -74,6 +75,9 @@ new_input_notify(struct wl_listener *listener, void *data) if (!wl_list_empty(&input->keyboards)) { caps |= WL_SEAT_CAPABILITY_KEYBOARD; } + if(input->touchpads) { + caps |= WL_SEAT_CAPABILITY_TOUCH; + } wlr_seat_set_capabilities(input->seat->seat, caps); }