xkb: fix XkbGetKbdByName returning incorrect data

This is a regression first caused by 182404fde6
that sends back the old xkb data instead of the new one.
This causes a mismatch in the data and size calculations between the
XkbComputeGetMapReplySize that is called above that calculates the size
of the reply and XkbAssembleMap that sets the data for the reply.

Without this fix this error is seen when running setxkbmap fr:
"Error loading new keyboard description".

Fixes setxkbmap error described in #180

Signed-off-by: dec05eba <dec05eba@protonmail.com>
This commit is contained in:
dec05eba 2025-06-20 01:53:17 +02:00 committed by Enrico Weigelt
parent 9adf08960e
commit 5342d0c380

View File

@ -6054,7 +6054,7 @@ ProcXkbGetKbdByName(ClientPtr client)
if (reported & (XkbGBN_SymbolsMask | XkbGBN_TypesMask)) { if (reported & (XkbGBN_SymbolsMask | XkbGBN_TypesMask)) {
char *buf = payload_walk + sizeof(mrep); char *buf = payload_walk + sizeof(mrep);
XkbAssembleMap(client, xkb, mrep, buf); XkbAssembleMap(client, new, mrep, buf);
if (client->swapped) { if (client->swapped) {
swaps(&mrep.sequenceNumber); swaps(&mrep.sequenceNumber);