summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-07-04 20:40:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-07-04 20:40:20 +0000
commita400a8773ace1941b1aeeeecb14b5e33f0efb989 (patch)
tree37828aa12dc92d777dc709f4d301ecb7d0e1ce5e /xserver
parent9a9ff73579ebb67c47506a7caf28fb1723801447 (diff)
Fix transformation of events supplying only a valuator for the y-coordinate.
ok matthieu@
Diffstat (limited to 'xserver')
-rw-r--r--xserver/dix/getevents.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xserver/dix/getevents.c b/xserver/dix/getevents.c
index c44abdc68..544cddb4c 100644
--- a/xserver/dix/getevents.c
+++ b/xserver/dix/getevents.c
@@ -1047,8 +1047,11 @@ transformAbsolute(DeviceIntPtr dev, int first, int num, int *valuators)
pixman_f_transform_point(&dev->transform, &p);
- valuators[0] = lround(p.v[0]);
- valuators[1] = lround(p.v[1]);
+ if (num >= 1 && first == 0)
+ *(valuators + 0) = lround(p.v[0]);
+
+ if (first <= 1 && num >= (2 - first))
+ *(valuators + 1 - first) = lround(p.v[1]);
}
/**