Enable server-side key repeat

This commit is contained in:
Andri Yngvason 2024-05-12 21:56:04 +00:00
parent f2c919d3b9
commit 6634812261
2 changed files with 7 additions and 1 deletions

View file

@ -11,7 +11,7 @@
#include "types/wlr_seat.h"
#include "util/global.h"
#define SEAT_VERSION 9
#define SEAT_VERSION 10
static void seat_handle_get_pointer(struct wl_client *client,
struct wl_resource *seat_resource, uint32_t id) {

View file

@ -78,6 +78,12 @@ void wlr_seat_keyboard_send_key(struct wlr_seat *wlr_seat, uint32_t time,
continue;
}
int version = wl_resource_get_version(resource);
if (state == WL_KEYBOARD_KEY_STATE_REPEATED &&
version < WL_KEYBOARD_KEY_STATE_REPEATED_SINCE_VERSION) {
continue;
}
wl_keyboard_send_key(resource, serial, time, key, state);
}
}