xtest: switch an inputInfo.pointer over to PickPointer.
Couple of whitespace fixes too.
This commit is contained in:
parent
e5dd7a9579
commit
33f1568992
23
Xext/xtest.c
23
Xext/xtest.c
|
@ -124,7 +124,7 @@ ProcXTestGetVersion(client)
|
||||||
rep.majorVersion = XTestMajorVersion;
|
rep.majorVersion = XTestMajorVersion;
|
||||||
rep.minorVersion = XTestMinorVersion;
|
rep.minorVersion = XTestMinorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion, n);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
|
||||||
|
@ -139,7 +139,8 @@ ProcXTestCompareCursor(client)
|
||||||
xXTestCompareCursorReply rep;
|
xXTestCompareCursorReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int n, rc;
|
int n, rc;
|
||||||
|
DeviceIntPtr pointer = PickPointer(client);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
|
@ -148,10 +149,10 @@ ProcXTestCompareCursor(client)
|
||||||
if (stuff->cursor == None)
|
if (stuff->cursor == None)
|
||||||
pCursor = NullCursor;
|
pCursor = NullCursor;
|
||||||
else if (stuff->cursor == XTestCurrentCursor)
|
else if (stuff->cursor == XTestCurrentCursor)
|
||||||
pCursor = GetSpriteCursor(inputInfo.pointer);
|
pCursor = GetSpriteCursor(pointer);
|
||||||
else {
|
else {
|
||||||
pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR);
|
pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR);
|
||||||
if (!pCursor)
|
if (!pCursor)
|
||||||
{
|
{
|
||||||
client->errorValue = stuff->cursor;
|
client->errorValue = stuff->cursor;
|
||||||
return (BadCursor);
|
return (BadCursor);
|
||||||
|
@ -162,7 +163,7 @@ ProcXTestCompareCursor(client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.same = (wCursor(pWin) == pCursor);
|
rep.same = (wCursor(pWin) == pCursor);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
|
@ -276,7 +277,7 @@ ProcXTestFakeInput(client)
|
||||||
/* swap the request back so we can simply re-execute it */
|
/* swap the request back so we can simply re-execute it */
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
(void) XTestSwapFakeInput(client, (xReq *)stuff);
|
(void) XTestSwapFakeInput(client, (xReq *)stuff);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
}
|
}
|
||||||
ResetCurrentRequest (client);
|
ResetCurrentRequest (client);
|
||||||
|
@ -426,7 +427,7 @@ ProcXTestFakeInput(client)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if ((!noPanoramiXExtension
|
if ((!noPanoramiXExtension
|
||||||
&& root->drawable.pScreen->myNum
|
&& root->drawable.pScreen->myNum
|
||||||
!= XineramaGetCursorScreen(dev))
|
!= XineramaGetCursorScreen(dev))
|
||||||
|| (noPanoramiXExtension && root != GetCurrentRootWindow(dev)))
|
|| (noPanoramiXExtension && root != GetCurrentRootWindow(dev)))
|
||||||
|
|
||||||
|
@ -545,14 +546,14 @@ XTestSwapFakeInput(client, req)
|
||||||
nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
|
nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
|
||||||
for (ev = (xEvent *)&req[1]; --nev >= 0; ev++)
|
for (ev = (xEvent *)&req[1]; --nev >= 0; ev++)
|
||||||
{
|
{
|
||||||
/* Swap event */
|
/* Swap event */
|
||||||
proc = EventSwapVector[ev->u.u.type & 0177];
|
proc = EventSwapVector[ev->u.u.type & 0177];
|
||||||
/* no swapping proc; invalid event type? */
|
/* no swapping proc; invalid event type? */
|
||||||
if (!proc || proc == NotImplemented) {
|
if (!proc || proc == NotImplemented) {
|
||||||
client->errorValue = ev->u.u.type;
|
client->errorValue = ev->u.u.type;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
(*proc)(ev, &sev);
|
(*proc)(ev, &sev);
|
||||||
*ev = sev;
|
*ev = sev;
|
||||||
}
|
}
|
||||||
return Success;
|
return Success;
|
||||||
|
|
Loading…
Reference in New Issue