update to xserver 21.1.12

This commit is contained in:
purplerain 2024-04-09 08:46:18 +00:00
parent c5d87f442b
commit f0fd08c832
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
59 changed files with 449 additions and 209 deletions

View file

@ -93,6 +93,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
GrabParameters param;
void *tmp;
int mask_len;
uint32_t length;
REQUEST(xXIPassiveGrabDeviceReq);
REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
@ -247,18 +248,11 @@ ProcXIPassiveGrabDevice(ClientPtr client)
}
}
if (client->swapped) {
/* save the value before SRepXIPassiveGrabDevice swaps it */
uint32_t length = rep.length;
WriteReplyToClient(client, sizeof(rep), &rep);
if (length)
WriteToClient(client, length * 4, modifiers_failed);
}
else {
WriteReplyToClient(client, sizeof(rep), &rep);
if (rep.num_modifiers)
WriteToClient(client, rep.length * 4, modifiers_failed);
}
/* save the value before SRepXIPassiveGrabDevice swaps it */
length = rep.length;
WriteReplyToClient(client, sizeof(rep), &rep);
if (rep.num_modifiers)
WriteToClient(client, length * 4, modifiers_failed);
out:
free(modifiers_failed);

View file

@ -349,6 +349,7 @@ ProcXIGetSelectedEvents(ClientPtr client)
InputClientsPtr others = NULL;
xXIEventMask *evmask = NULL;
DeviceIntPtr dev;
uint32_t length;
REQUEST(xXIGetSelectedEventsReq);
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
@ -418,21 +419,12 @@ ProcXIGetSelectedEvents(ClientPtr client)
}
}
if (client->swapped) {
/* save the value before SRepXIGetSelectedEvents swaps it */
uint32_t length = reply.length;
/* save the value before SRepXIGetSelectedEvents swaps it */
length = reply.length;
WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply);
WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply);
if (length)
WriteToClient(client, length * 4, buffer);
}
else {
WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply);
if (reply.num_masks)
WriteToClient(client, reply.length * 4, buffer);
}
if (reply.num_masks)
WriteToClient(client, length * 4, buffer);
free(buffer);
return Success;