An indirect touch device, such as a multitouch touchpad, has relative X and Y axes internally. These axes are in screen coordinates. However, the cooresponding axes for touch events are in absolute device coordinates.
Signed-off-by: Chase Douglas <chase.doug...@canonical.com> --- dix/getevents.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 1547059..3e37910 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -222,17 +222,23 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) int i; /* Set the data to the previous value for unset absolute axes. The values - * may be used when sent as part of an XI 1.x valuator event. */ + * may be used when sent as part of an XI 1.x valuator event. + * + * All touch event valuators are absolute, even if the corresponding pointer + * valuator is relative. This is the case for indirect touch devices for the + * X and Y axes. */ for (i = 0; i < valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) { SetBit(event->valuators.mask, i); - if (valuator_get_mode(dev, i) == Absolute) + if (IsTouchEvent((InternalEvent *)event) || + valuator_get_mode(dev, i) == Absolute) SetBit(event->valuators.mode, i); event->valuators.data[i] = valuator_mask_get_double(mask, i); } - else if (valuator_get_mode(dev, i) == Absolute) + else if (IsTouchEvent((InternalEvent *)event) || + valuator_get_mode(dev, i) == Absolute) event->valuators.data[i] = dev->valuator->axisVal[i]; } } -- 1.7.8.3 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel