mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
dix: write out xGetPointerControlReply directly
This commit is contained in:
@@ -2481,7 +2481,6 @@ ProcGetMotionEvents(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
xTimecoord *coords = (xTimecoord *) NULL;
|
||||
xGetMotionEventsReply rep;
|
||||
int i, count, xmin, xmax, ymin, ymax, rc;
|
||||
unsigned long nEvents;
|
||||
DeviceIntPtr mouse = PickPointer(client);
|
||||
@@ -2500,10 +2499,7 @@ ProcGetMotionEvents(ClientPtr client)
|
||||
UpdateCurrentTimeIf();
|
||||
if (mouse->valuator->motionHintWindow)
|
||||
MaybeStopHint(mouse, client);
|
||||
rep = (xGetMotionEventsReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence
|
||||
};
|
||||
|
||||
nEvents = 0;
|
||||
start = ClientTimeToServerTime(stuff->start);
|
||||
stop = ClientTimeToServerTime(stuff->stop);
|
||||
@@ -2530,9 +2526,20 @@ ProcGetMotionEvents(ClientPtr client)
|
||||
nEvents++;
|
||||
}
|
||||
}
|
||||
rep.length = nEvents * bytes_to_int32(sizeof(xTimecoord));
|
||||
rep.nEvents = nEvents;
|
||||
WriteReplyToClient(client, sizeof(xGetMotionEventsReply), &rep);
|
||||
|
||||
xGetMotionEventsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = nEvents * bytes_to_int32(sizeof(xTimecoord)),
|
||||
.nEvents = nEvents,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.nEvents);
|
||||
}
|
||||
WriteToClient(client, sizeof(xGetMotionEventsReply), &rep);
|
||||
if (nEvents) {
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) SwapTimeCoordWrite;
|
||||
WriteSwappedDataToClient(client, nEvents * sizeof(xTimecoord),
|
||||
|
||||
@@ -287,15 +287,6 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord * pRep)
|
||||
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swapl(&pRep->length);
|
||||
swapl(&pRep->nEvents);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply * pRep)
|
||||
{
|
||||
|
||||
@@ -755,7 +755,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SQueryPointerReply,
|
||||
(ReplySwapPtr) SGetMotionEventsReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd, /* 40 */
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
|
||||
@@ -75,11 +75,6 @@ extern void SwapTimeCoordWrite(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xTimecoord * /* pRep */ );
|
||||
|
||||
extern void SGetMotionEventsReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetMotionEventsReply * /* pRep */
|
||||
);
|
||||
|
||||
extern void SGetInputFocusReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetInputFocusReply * /* pRep */ );
|
||||
|
||||
Reference in New Issue
Block a user