summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]);
}
/**