From 70a7a1c03677278afd42bb1c766753b277a98367 Mon Sep 17 00:00:00 2001 From: David Arroyo Date: Sat, 22 Feb 2025 12:33:49 +0100 Subject: [PATCH] Receive key repeat info from compositor Upgrade to version 4 of the wl_seat interface which adds the wl_keyboard::repeat_info event allowing the compositor to configure key repeat delay and rate. --- src/cmd/devdraw/wayland.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/devdraw/wayland.c b/src/cmd/devdraw/wayland.c index 7e4a0c01..909015de 100644 --- a/src/cmd/devdraw/wayland.c +++ b/src/cmd/devdraw/wayland.c @@ -164,7 +164,7 @@ static void registry_global(void *data, struct wl_registry *wl_registry, &xdg_wm_base_interface, 1); } else if (strcmp(interface, wl_seat_interface.name) == 0) { - wl_seat = wl_registry_bind(wl_registry, name, &wl_seat_interface, 1); + wl_seat = wl_registry_bind(wl_registry, name, &wl_seat_interface, 4); } else if (strcmp(interface, wl_data_device_manager_interface.name) == 0) { wl_data_device_manager = wl_registry_bind(wl_registry, name, &wl_data_device_manager_interface, 2); @@ -844,7 +844,6 @@ void wl_keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard, qunlock(&wayland_lock); } -// Currently we don't bind the keyboard with the correct version to get this event. void wl_keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard, int32_t rate, int32_t delay) { DEBUG("wl_keyboard_repeat_info(rate=%d, delay=%d)\n",