xwayland: copy repeat settings from the compositor map

Previously the repeat settings sent by the compositor were completely
ignored.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1759>
This commit is contained in:
Julian Orth 2025-01-11 20:03:27 +01:00
parent 6cc358dfb4
commit 8d9184db5f

View File

@ -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);