From b675c2e568972e04691e8eafd486464f8811cf83 Mon Sep 17 00:00:00 2001 From: nerdopolis Date: Fri, 26 Apr 2024 21:55:38 -0400 Subject: [PATCH] seat: Assume there is always a keyboard device This makes it so that users first keystroke doesn't get 'eaten' This makes cage easier to use, especially when foot is the only client --- seat.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/seat.c b/seat.c index 8008dd9..815a348 100644 --- a/seat.c +++ b/seat.c @@ -113,11 +113,8 @@ press_cursor_button(struct cg_seat *seat, struct wlr_input_device *device, uint3 static void update_capabilities(struct cg_seat *seat) { - uint32_t caps = 0; + uint32_t caps = WL_SEAT_CAPABILITY_KEYBOARD; - if (!wl_list_empty(&seat->keyboard_groups)) { - caps |= WL_SEAT_CAPABILITY_KEYBOARD; - } if (!wl_list_empty(&seat->pointers)) { caps |= WL_SEAT_CAPABILITY_POINTER; } @@ -880,6 +877,8 @@ seat_create(struct cg_server *server, struct wlr_backend *backend) seat->start_drag.notify = handle_start_drag; wl_signal_add(&seat->seat->events.start_drag, &seat->start_drag); + update_capabilities(seat); + return seat; }