mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dix: write out xGetKeyboardMappingReply directly
This commit is contained in:
@@ -1962,7 +1962,6 @@ ProcSetPointerMapping(ClientPtr client)
|
||||
int
|
||||
ProcGetKeyboardMapping(ClientPtr client)
|
||||
{
|
||||
xGetKeyboardMappingReply rep;
|
||||
DeviceIntPtr kbd = PickKeyboard(client);
|
||||
XkbDescPtr xkb;
|
||||
KeySymsPtr syms;
|
||||
@@ -1991,14 +1990,20 @@ ProcGetKeyboardMapping(ClientPtr client)
|
||||
if (!syms)
|
||||
return BadAlloc;
|
||||
|
||||
rep = (xGetKeyboardMappingReply) {
|
||||
xGetKeyboardMappingReply rep = {
|
||||
.type = X_Reply,
|
||||
.keySymsPerKeyCode = syms->mapWidth,
|
||||
.sequenceNumber = client->sequence,
|
||||
/* length is a count of 4 byte quantities and KeySyms are 4 bytes */
|
||||
.length = syms->mapWidth * stuff->count
|
||||
};
|
||||
WriteReplyToClient(client, sizeof(xGetKeyboardMappingReply), &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
|
||||
WriteSwappedDataToClient(client,
|
||||
syms->mapWidth * stuff->count * sizeof(KeySym),
|
||||
|
||||
@@ -535,15 +535,6 @@ SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
||||
xGetKeyboardMappingReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swapl(&pRep->length);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetKeyboardControlReply(ClientPtr pClient, int size,
|
||||
xGetKeyboardControlReply * pRep)
|
||||
|
||||
@@ -817,7 +817,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
||||
(ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */
|
||||
(ReplySwapPtr) SListExtensionsReply,
|
||||
ReplyNotSwappd, /* 100 */
|
||||
(ReplySwapPtr) SGetKeyboardMappingReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetKeyboardControlReply,
|
||||
ReplyNotSwappd,
|
||||
|
||||
@@ -154,11 +154,6 @@ extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xListExtensionsReply * /* pRep */ );
|
||||
|
||||
extern void SGetKeyboardMappingReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetKeyboardMappingReply *
|
||||
/* pRep */ );
|
||||
|
||||
extern void SGetKeyboardControlReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetKeyboardControlReply *
|
||||
|
||||
Reference in New Issue
Block a user