diff options
author | marha <marha@users.sourceforge.net> | 2013-02-11 08:02:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-02-11 08:02:10 +0100 |
commit | 8753441b3ba4316448e1ae5f408e6a84b0116a3c (patch) | |
tree | 8defe6bffed265e0846489015877f2384f022e67 /xorg-server/Xext/xtest.c | |
parent | 212958ab41363d50d87470f6fb47bbcdc7a74c74 (diff) | |
download | vcxsrv-8753441b3ba4316448e1ae5f408e6a84b0116a3c.tar.gz vcxsrv-8753441b3ba4316448e1ae5f408e6a84b0116a3c.tar.bz2 vcxsrv-8753441b3ba4316448e1ae5f408e6a84b0116a3c.zip |
xserver mesa git update 11 Feb 2013
xserver commit c1602d1c17967bdd4db9db19b3a9c0dfca6a58aa
mesa commit 990bd49fba7d539e950bdda6eb9819a9abf14850
Diffstat (limited to 'xorg-server/Xext/xtest.c')
-rw-r--r-- | xorg-server/Xext/xtest.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xorg-server/Xext/xtest.c b/xorg-server/Xext/xtest.c index 2abdc7f58..0a854f39a 100644 --- a/xorg-server/Xext/xtest.c +++ b/xorg-server/Xext/xtest.c @@ -156,7 +156,6 @@ ProcXTestFakeInput(ClientPtr client) DeviceIntPtr dev = NULL; WindowPtr root; Bool extension = FALSE; - deviceValuator *dv = NULL; ValuatorMask mask; int valuators[MAX_VALUATORS] = { 0 }; int numValuators = 0; @@ -241,14 +240,14 @@ ProcXTestFakeInput(ClientPtr client) } if (nev > 1 && !dev->valuator) { - client->errorValue = dv->first_valuator; + client->errorValue = firstValuator; return BadValue; } /* check validity of valuator events */ base = firstValuator; for (n = 1; n < nev; n++) { - dv = (deviceValuator *) (ev + n); + deviceValuator *dv = (deviceValuator *) (ev + n); if (dv->type != DeviceValuator) { client->errorValue = dv->type; return BadValue; @@ -306,7 +305,7 @@ ProcXTestFakeInput(ClientPtr client) numValuators = 2; firstValuator = 0; if (ev->u.u.detail == xFalse) - flags = POINTER_ABSOLUTE | POINTER_SCREEN; + flags = POINTER_ABSOLUTE | POINTER_DESKTOP; break; default: client->errorValue = ev->u.u.type; @@ -377,6 +376,14 @@ ProcXTestFakeInput(ClientPtr client) client->errorValue = ev->u.keyButtonPointer.root; return BadValue; } + + /* Add the root window's offset to the valuators */ + if ((flags & POINTER_ABSOLUTE) && firstValuator <= 1 && numValuators > 0) { + if (firstValuator == 0) + valuators[0] += root->drawable.pScreen->x; + if (firstValuator < 2 && firstValuator + numValuators > 1) + valuators[1 - firstValuator] += root->drawable.pScreen->y; + } } if (ev->u.u.detail != xTrue && ev->u.u.detail != xFalse) { client->errorValue = ev->u.u.detail; @@ -419,7 +426,7 @@ ProcXTestFakeInput(ClientPtr client) } for (i = 0; i < nevents; i++) - mieqProcessDeviceEvent(dev, &xtest_evlist[i], NULL); + mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer)); if (need_ptr_update) miPointerUpdateSprite(dev); |