From 8d9184db5f7b47315b6ed091e193bdf416aacf5c Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sat, 11 Jan 2025 20:03:27 +0100 Subject: [PATCH] xwayland: copy repeat settings from the compositor map Previously the repeat settings sent by the compositor were completely ignored. Signed-off-by: Julian Orth Part-of: --- hw/xwayland/xwayland-input.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index ac67d478e..df2ed6907 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -1187,9 +1187,20 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, XkbUpdateDescActions(xkb, xkb->min_key_code, XkbNumKeys(xkb), &changes); - if (xwl_seat->keyboard->key) + memcpy( + xwl_seat->keyboard->kbdfeed->ctrl.autoRepeats, + xkb->ctrls->per_key_repeat, + XkbPerKeyBitArraySize + ); + if (xwl_seat->keyboard->key) { /* Keep the current controls */ XkbCopyControls(xkb, xwl_seat->keyboard->key->xkbInfo->desc); + memcpy( + xkb->ctrls->per_key_repeat, + xwl_seat->keyboard->kbdfeed->ctrl.autoRepeats, + XkbPerKeyBitArraySize + ); + } XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb);