summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Vigerlöf <Magnus.Vigerlof@ipbo.se>2008-02-02 23:04:46 +0100
committerJulien Cristau <jcristau@debian.org>2008-05-07 19:22:41 +0200
commitb1145a6b428db2037c79ffb36116e7183f30829f (patch)
tree71433eb64d0660a64552ed65610300429d42249f
parenta68d0ef4a65bcd52c52ba54e6925082a9145fad3 (diff)
dix: Move motion history update until after screen crossing and clipping
Cross screen and clip the coordinates before updating the motion history so that it will have the same contents as the events that are reported. (cherry picked from commit a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973)
-rw-r--r--dix/getevents.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index c33371bde..d0fe2dbf4 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -665,15 +665,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
}
}
- /* Drop x and y back into the valuators list, if they were originally
- * present. */
- if (first_valuator == 0 && num_valuators >= 1)
- valuators[0] = x;
- if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
- valuators[1 - first_valuator] = y;
-
- updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
-
pDev->valuator->lastx = x;
pDev->valuator->lasty = y;
/* Convert the dev coord back to screen coord if we're
@@ -719,6 +710,15 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
cp->valuator->lasty = y;
}
+ /* Drop x and y back into the valuators list, if they were originally
+ * present. */
+ if (first_valuator == 0 && num_valuators >= 1)
+ valuators[0] = pDev->valuator->lastx;
+ if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
+ valuators[1 - first_valuator] = pDev->valuator->lasty;
+
+ updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
+
/* for some reason inputInfo.pointer does not have coreEvents set */
if (coreOnly || pDev->coreEvents) {
events->u.u.type = type;