summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-01-18 18:04:13 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-01-24 13:26:36 +1000
commitf00e5b02f5d9928cd88961e761da91b5faff1b32 (patch)
tree2f9ac71cc65447fdb94d9f21f220c49785edd57b /dix
parent24dc0389da3970e83e4908039957567e55f9ea05 (diff)
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>
Diffstat (limited to 'dix')
-rw-r--r--dix/getevents.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index d0014e617..2946b16bb 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1867,7 +1867,12 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (need_rawevent)
set_raw_valuators(raw, &mask, raw->valuators.data);
- scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
+ /* 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,
&devx, &devy, &screenx, &screeny);