summaryrefslogtreecommitdiff
path: root/Xext/xtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/xtest.c')
-rw-r--r--Xext/xtest.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index fe3816e9c..ab882311a 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -159,6 +159,7 @@ ProcXTestFakeInput(ClientPtr client)
int nevents = 0;
int i;
int base = 0;
+ int flags = 0;
nev = (stuff->length << 2) - sizeof(xReq);
if ((nev % sizeof(xEvent)) || !nev)
@@ -209,8 +210,14 @@ ProcXTestFakeInput(ClientPtr client)
client->errorValue = ev->u.u.type;
return BadValue;
}
+
+ if (ev->u.u.detail == xFalse)
+ flags |= POINTER_ABSOLUTE;
} else
+ {
firstValuator = 0;
+ flags |= POINTER_ABSOLUTE;
+ }
if (nev > 1 && !dev->valuator)
{
@@ -279,6 +286,8 @@ ProcXTestFakeInput(ClientPtr client)
valuators[1] = ev->u.keyButtonPointer.rootY;
numValuators = 2;
firstValuator = 0;
+ if (ev->u.u.detail == xFalse)
+ flags = POINTER_ABSOLUTE | POINTER_SCREEN;
break;
default:
client->errorValue = ev->u.u.type;
@@ -376,14 +385,13 @@ ProcXTestFakeInput(ClientPtr client)
GetEventList(&events);
switch(type) {
case MotionNotify:
- nevents = GetPointerEvents(events, dev, type, 0,
- (ev->u.u.detail == xFalse) ? POINTER_ABSOLUTE : 0,
+ nevents = GetPointerEvents(events, dev, type, 0, flags,
firstValuator, numValuators, valuators);
break;
case ButtonPress:
case ButtonRelease:
nevents = GetPointerEvents(events, dev, type, ev->u.u.detail,
- POINTER_ABSOLUTE, firstValuator,
+ flags, firstValuator,
numValuators, valuators);
break;
case KeyPress: