Only scale direct device touch coordinates

Indirect touch devices provide valuator values in pure device
coordinates. They also don't need to be fixed up for screen crossings.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Chase Douglas 2012-01-18 18:04:13 -08:00 committed by Peter Hutterer
parent 24dc0389da
commit f00e5b02f5

View File

@ -1867,6 +1867,11 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (need_rawevent)
set_raw_valuators(raw, &mask, raw->valuators.data);
/* Indirect device touch coordinates are not used for cursor positioning.
* They are merely informational, and are provided in device coordinates.
* The device sprite is used for positioning instead, and it is already
* scaled. */
if (t->mode == XIDirectTouch)
scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
if (emulate_pointer)
scr = positionSprite(dev, Absolute, &mask,