XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks

This commit is contained in:
Kaleb Keithley 2003-11-25 19:29:01 +00:00
commit adc7f9a4eb
705 changed files with 30330 additions and 26603 deletions

View file

@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.7 2001/12/14 19:58:51 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.11 2003/11/17 22:20:27 dawes Exp $ */
#include "X.h"
#define NEED_EVENTS
@ -53,22 +53,27 @@ from The Open Group.
#include "xf86_ansic.h"
#endif
#include "modinit.h"
#if 0
static unsigned char XTestReqCode;
#endif
#ifdef XINPUT
extern int DeviceValuator;
#endif /* XINPUT */
static void XTestResetProc(
#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
static void XTestResetProc(
ExtensionEntry * /* extEntry */
);
static int XTestSwapFakeInput(
#if NeedFunctionPrototypes
ClientPtr /* client */,
xReq * /* req */
#endif
);
static DISPATCH_PROC(ProcXTestCompareCursor);
@ -83,14 +88,20 @@ static DISPATCH_PROC(SProcXTestGetVersion);
static DISPATCH_PROC(SProcXTestGrabControl);
void
XTestExtensionInit()
XTestExtensionInit(INITARGS)
{
#if 0
ExtensionEntry *extEntry;
if ((extEntry = AddExtension(XTestExtensionName, 0, 0,
ProcXTestDispatch, SProcXTestDispatch,
XTestResetProc, StandardMinorOpcode)) != 0)
XTestReqCode = (unsigned char)extEntry->base;
#else
(void) AddExtension(XTestExtensionName, 0, 0,
ProcXTestDispatch, SProcXTestDispatch,
XTestResetProc, StandardMinorOpcode);
#endif
}
/*ARGSUSED*/
@ -378,6 +389,33 @@ ProcXTestFakeInput(client)
client->errorValue = ev->u.u.detail;
return BadValue;
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
ScreenPtr pScreen = root->drawable.pScreen;
BoxRec box;
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],
x, y, &box)) {
FOR_NSCREENS(i) {
if (i == pScreen->myNum) continue;
if (POINT_IN_REGION(pScreen,
&XineramaScreenRegions[i],
x, y, &box)) {
root = WindowTable[i];
x -= panoramiXdataPtr[i].x;
y -= panoramiXdataPtr[i].y;
ev->u.keyButtonPointer.rootX = x;
ev->u.keyButtonPointer.rootY = y;
break;
}
}
}
}
#endif
if (ev->u.keyButtonPointer.rootX < 0)
ev->u.keyButtonPointer.rootX = 0;
else if (ev->u.keyButtonPointer.rootX >= root->drawable.width)
@ -386,7 +424,15 @@ ProcXTestFakeInput(client)
ev->u.keyButtonPointer.rootY = 0;
else if (ev->u.keyButtonPointer.rootY >= root->drawable.height)
ev->u.keyButtonPointer.rootY = root->drawable.height - 1;
#ifdef PANORAMIX
if ((!noPanoramiXExtension
&& root->drawable.pScreen->myNum != XineramaGetCursorScreen())
|| (noPanoramiXExtension && root != GetCurrentRootWindow()))
#else
if (root != GetCurrentRootWindow())
#endif
{
NewCurrentScreen(root->drawable.pScreen,
ev->u.keyButtonPointer.rootX,