mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
dix: write out xSetModifierMappingReply directly
This commit is contained in:
@@ -1776,7 +1776,6 @@ BadDeviceMap(BYTE * buff, int length, unsigned low, unsigned high, XID *errval)
|
||||
int
|
||||
ProcSetModifierMapping(ClientPtr client)
|
||||
{
|
||||
xSetModifierMappingReply rep;
|
||||
int rc;
|
||||
|
||||
REQUEST(xSetModifierMappingReq);
|
||||
@@ -1786,11 +1785,6 @@ ProcSetModifierMapping(ClientPtr client)
|
||||
bytes_to_int32(sizeof(xSetModifierMappingReq))))
|
||||
return BadLength;
|
||||
|
||||
rep = (xSetModifierMappingReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0
|
||||
};
|
||||
|
||||
rc = change_modmap(client, PickKeyboard(client), (KeyCode *) &stuff[1],
|
||||
stuff->numKeyPerModifier);
|
||||
@@ -1799,9 +1793,17 @@ ProcSetModifierMapping(ClientPtr client)
|
||||
if (rc != MappingSuccess && rc != MappingFailed && rc != MappingBusy)
|
||||
return rc;
|
||||
|
||||
rep.success = rc;
|
||||
xSetModifierMappingReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.success = rc,
|
||||
};
|
||||
|
||||
WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
}
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
@@ -834,7 +834,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
||||
ReplyNotSwappd, /* 115 */
|
||||
(ReplySwapPtr) SGenericReply, /* SetPointerMapping */
|
||||
(ReplySwapPtr) SGetPointerMappingReply,
|
||||
(ReplySwapPtr) SGenericReply, /* SetModifierMapping */
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetModifierMappingReply, /* 119 */
|
||||
ReplyNotSwappd, /* 120 */
|
||||
ReplyNotSwappd, /* 121 */
|
||||
|
||||
Reference in New Issue
Block a user