aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-11 08:04:06 +0100
committermarha <marha@users.sourceforge.net>2013-02-11 08:04:06 +0100
commitc4583f59d8460f05ee211c2f8ed6208addfe3087 (patch)
tree59420aaa7f249fcf3766adfab41e5285d48048e8 /xorg-server/Xext
parent71ff3367cab660035c6ea38e5171841dacd461b5 (diff)
parent8753441b3ba4316448e1ae5f408e6a84b0116a3c (diff)
downloadvcxsrv-c4583f59d8460f05ee211c2f8ed6208addfe3087.tar.gz
vcxsrv-c4583f59d8460f05ee211c2f8ed6208addfe3087.tar.bz2
vcxsrv-c4583f59d8460f05ee211c2f8ed6208addfe3087.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver mesa git update 11 Feb 2013
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r--xorg-server/Xext/xtest.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/xorg-server/Xext/xtest.c b/xorg-server/Xext/xtest.c
index e7f94d3d9..b0b974c78 100644
--- a/xorg-server/Xext/xtest.c
+++ b/xorg-server/Xext/xtest.c
@@ -153,7 +153,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;
@@ -238,14 +237,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;
@@ -303,7 +302,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;
@@ -374,6 +373,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;
@@ -416,7 +423,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);