summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-23 13:23:02 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-23 13:23:02 +0930
commit7eec1c23a34591064ea64499acb24f22ada08dfa (patch)
tree8462f5c85bf70a93123188777d37f19dd332fd6c /dix
parent75551a2ef949c2cfb53fdc4b97f3964a5e2f45f5 (diff)
dix: don't allow relative data in deviceValuators.
In GPE, we don't care about the device mode. Let's put the absolute values into the deviceValuator event and worry about relative valuators on the other side of the EQ.
Diffstat (limited to 'dix')
-rw-r--r--dix/getevents.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 48aa0e8b5..23ec6c4b2 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -833,23 +833,10 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
-
- /* update the valuators based on the mode of the InputDevice */
- if(pDev->valuator->mode == Absolute) {
- /* Update the valuators with the true value sent to the client*/
- if(v0) *v0 = x;
- if(v1) *v1 = y;
- /*TODO Ensure that valuator 2 and onward also are absolute */
- } else {/* Relative mode */
- /* If driver reported in absolute, calculate the relative valuator
- * values as a delta from the old absolute values of the valuator
- * values. If relative report, keep it as-is.*/
- if (flags & POINTER_ABSOLUTE) {
- int i;
- for (i = 0; i < num_valuators && i < pDev->last.numValuators; i++)
- valuators[i] = valuators[i] - pDev->last.valuators[i + first_valuator];
- }
- }
+ /* Update the valuators with the true value sent to the client*/
+ if(v0) *v0 = x;
+ if(v1) *v1 = y;
+ /* TODO: other axes */
/* dropy x/y (device coordinates) back into valuators for next event */
pDev->last.valuators[0] = x;