dix: write out X_QueryBestSize reply directly
No need for using a complex callback machinery, if we just move the little pieces of byte-swapping directly into the request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
fa4c80243f
commit
d459390a2d
|
@ -3193,7 +3193,6 @@ ProcFreeCursor(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcQueryBestSize(ClientPtr client)
|
ProcQueryBestSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
xQueryBestSizeReply reply;
|
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -3219,14 +3218,21 @@ ProcQueryBestSize(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
(*pScreen->QueryBestSize) (stuff->class, &stuff->width,
|
(*pScreen->QueryBestSize) (stuff->class, &stuff->width,
|
||||||
&stuff->height, pScreen);
|
&stuff->height, pScreen);
|
||||||
reply = (xQueryBestSizeReply) {
|
|
||||||
|
xQueryBestSizeReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
.length = 0,
|
||||||
.width = stuff->width,
|
.width = stuff->width,
|
||||||
.height = stuff->height
|
.height = stuff->height
|
||||||
};
|
};
|
||||||
WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply);
|
|
||||||
|
if (client->swapped) {
|
||||||
|
swaps(&rep.sequenceNumber);
|
||||||
|
swaps(&rep.width);
|
||||||
|
swaps(&rep.height);
|
||||||
|
}
|
||||||
|
WriteToClient(client, sizeof(rep), &rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,15 +310,6 @@ SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep)
|
||||||
WriteToClient(pClient, size, pRep);
|
WriteToClient(pClient, size, pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _X_COLD
|
|
||||||
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply * pRep)
|
|
||||||
{
|
|
||||||
swaps(&pRep->sequenceNumber);
|
|
||||||
swaps(&pRep->width);
|
|
||||||
swaps(&pRep->height);
|
|
||||||
WriteToClient(pClient, size, pRep);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _X_COLD
|
void _X_COLD
|
||||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
||||||
{
|
{
|
||||||
|
|
|
@ -812,7 +812,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
||||||
ReplyNotSwappd,
|
ReplyNotSwappd,
|
||||||
ReplyNotSwappd, /* 95 */
|
ReplyNotSwappd, /* 95 */
|
||||||
ReplyNotSwappd,
|
ReplyNotSwappd,
|
||||||
(ReplySwapPtr) SQueryBestSizeReply,
|
ReplyNotSwappd,
|
||||||
(ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */
|
(ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */
|
||||||
(ReplySwapPtr) SListExtensionsReply,
|
(ReplySwapPtr) SListExtensionsReply,
|
||||||
ReplyNotSwappd, /* 100 */
|
ReplyNotSwappd, /* 100 */
|
||||||
|
|
|
@ -68,10 +68,6 @@ extern void SGetFontPathReply(ClientPtr /* pClient */ ,
|
||||||
int /* size */ ,
|
int /* size */ ,
|
||||||
xGetFontPathReply * /* pRep */ );
|
xGetFontPathReply * /* pRep */ );
|
||||||
|
|
||||||
extern void SQueryBestSizeReply(ClientPtr /* pClient */ ,
|
|
||||||
int /* size */ ,
|
|
||||||
xQueryBestSizeReply * /* pRep */ );
|
|
||||||
|
|
||||||
extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
||||||
int /* size */ ,
|
int /* size */ ,
|
||||||
xListExtensionsReply * /* pRep */ );
|
xListExtensionsReply * /* pRep */ );
|
||||||
|
|
Loading…
Reference in New Issue