set seat capability for touch
This commit is contained in:
parent
9b36e46674
commit
6cd5c3d245
@ -15,6 +15,7 @@ struct kiwmi_input {
|
|||||||
struct wl_listener new_input;
|
struct wl_listener new_input;
|
||||||
struct kiwmi_cursor *cursor;
|
struct kiwmi_cursor *cursor;
|
||||||
struct kiwmi_seat *seat;
|
struct kiwmi_seat *seat;
|
||||||
|
int touchpads;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct wl_signal keyboard_new;
|
struct wl_signal keyboard_new;
|
||||||
|
@ -32,6 +32,7 @@ static void
|
|||||||
new_touch(struct kiwmi_input *input, struct wlr_input_device *device)
|
new_touch(struct kiwmi_input *input, struct wlr_input_device *device)
|
||||||
{
|
{
|
||||||
wlr_cursor_attach_input_device(input->cursor->cursor, device);
|
wlr_cursor_attach_input_device(input->cursor->cursor, device);
|
||||||
|
input->touchpads++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -74,6 +75,9 @@ new_input_notify(struct wl_listener *listener, void *data)
|
|||||||
if (!wl_list_empty(&input->keyboards)) {
|
if (!wl_list_empty(&input->keyboards)) {
|
||||||
caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
||||||
}
|
}
|
||||||
|
if(input->touchpads) {
|
||||||
|
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||||
|
}
|
||||||
|
|
||||||
wlr_seat_set_capabilities(input->seat->seat, caps);
|
wlr_seat_set_capabilities(input->seat->seat, caps);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user