diff options
Diffstat (limited to 'nx-X11/programs/Xserver/Xext/xtest.c')
| -rw-r--r-- | nx-X11/programs/Xserver/Xext/xtest.c | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index 994b0c502..d78efd39b 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/Xext/xtest.c,v 1.6 2005/07/03 08:53:36 daniels Exp $ */ -/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -27,15 +25,13 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.10 2003/10/28 23:08:44 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> -#define NEED_EVENTS -#include <X11/Xproto.h> +#include <nx-X11/X.h> +#include <nx-X11/Xproto.h> #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -46,19 +42,14 @@ from The Open Group. #include "dixevents.h" #include "sleepuntil.h" #define _XTEST_SERVER_ -#include <X11/extensions/XTest.h> -#include <X11/extensions/xteststr.h> +#include <nx-X11/extensions/xtestconst.h> +#include <nx-X11/extensions/xteststr.h> #ifdef XINPUT -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #define EXTENSION_EVENT_BASE 64 #include "extinit.h" /* LookupDeviceIntRec */ #endif /* XINPUT */ -#ifdef EXTMODULE -#include "xf86_ansic.h" -#endif - -#include "modinit.h" #if 0 static unsigned char XTestReqCode; @@ -93,7 +84,7 @@ static DISPATCH_PROC(SProcXTestGetVersion); static DISPATCH_PROC(SProcXTestGrabControl); void -XTestExtensionInit(INITARGS) +XTestExtensionInit(void) { #if 0 ExtensionEntry *extEntry; @@ -121,7 +112,6 @@ ProcXTestGetVersion(client) register ClientPtr client; { xXTestGetVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xXTestGetVersionReq); rep.type = X_Reply; @@ -130,10 +120,10 @@ ProcXTestGetVersion(client) rep.majorVersion = XTestMajorVersion; rep.minorVersion = XTestMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.minorVersion); } - WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); + WriteToClient(client, sizeof(xXTestGetVersionReply), &rep); return(client->noClientException); } @@ -145,7 +135,6 @@ ProcXTestCompareCursor(client) xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - register int n; REQUEST_SIZE_MATCH(xXTestCompareCursorReq); pWin = (WindowPtr)LookupWindow(stuff->window, client); @@ -168,9 +157,9 @@ ProcXTestCompareCursor(client) rep.sequenceNumber = client->sequence; rep.same = (wCursor(pWin) == pCursor); if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } - WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); + WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep); return(client->noClientException); } @@ -180,7 +169,7 @@ ProcXTestFakeInput(client) { REQUEST(xXTestFakeInputReq); int nev; - int n; + int n; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; @@ -285,7 +274,7 @@ ProcXTestFakeInput(client) if (client->swapped) { (void) XTestSwapFakeInput(client, (xReq *)stuff); - swaps(&stuff->length, n); + swaps(&stuff->length); } ResetCurrentRequest (client); client->sequence--; @@ -402,14 +391,14 @@ ProcXTestFakeInput(client) int i; int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; - if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], + if (!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum], x, y, &box)) { FOR_NSCREENS(i) { if (i == pScreen->myNum) continue; - if (POINT_IN_REGION(pScreen, + if (RegionContainsPoint( &XineramaScreenRegions[i], x, y, &box)) { - root = WindowTable[i]; + root = screenInfo.screens[i]->root; x -= panoramiXdataPtr[i].x; y -= panoramiXdataPtr[i].y; ev->u.keyButtonPointer.rootX = x; @@ -512,12 +501,11 @@ static int SProcXTestGetVersion(client) register ClientPtr client; { - register int n; REQUEST(xXTestGetVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGetVersionReq); - swaps(&stuff->minorVersion, n); + swaps(&stuff->minorVersion); return ProcXTestGetVersion(client); } @@ -525,13 +513,12 @@ static int SProcXTestCompareCursor(client) register ClientPtr client; { - register int n; REQUEST(xXTestCompareCursorReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); - swapl(&stuff->window, n); - swapl(&stuff->cursor, n); + swapl(&stuff->window); + swapl(&stuff->cursor); return ProcXTestCompareCursor(client); } @@ -568,7 +555,7 @@ SProcXTestFakeInput(client) register int n; REQUEST(xReq); - swaps(&stuff->length, n); + swaps(&stuff->length); n = XTestSwapFakeInput(client, stuff); if (n != Success) return n; @@ -579,10 +566,9 @@ static int SProcXTestGrabControl(client) register ClientPtr client; { - register int n; REQUEST(xXTestGrabControlReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGrabControlReq); return ProcXTestGrabControl(client); } |
