mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-15 22:05:31 -05:00
Enable server-side key repeat
This commit is contained in:
parent
f2c919d3b9
commit
6634812261
2 changed files with 7 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue