summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dix/getevents.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 90d5434ca..2056f856d 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1105,18 +1105,19 @@ transform(struct pixman_f_transform *m, int *x, int *y)
static void
transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
{
- int x, y;
+ int x, y, ox, oy;
- x = valuator_mask_isset(mask, 0) ? valuator_mask_get(mask, 0) :
- dev->last.valuators[0];
- y = valuator_mask_isset(mask, 1) ? valuator_mask_get(mask, 1) :
- dev->last.valuators[1];
+ ox = x = valuator_mask_isset(mask, 0) ? valuator_mask_get(mask, 0) :
+ dev->last.valuators[0];
+ oy = y = valuator_mask_isset(mask, 1) ? valuator_mask_get(mask, 1) :
+ dev->last.valuators[1];
transform(&dev->transform, &x, &y);
- if (valuator_mask_isset(mask, 0))
+ if (valuator_mask_isset(mask, 0) || ox != x)
valuator_mask_set(mask, 0, x);
- if (valuator_mask_isset(mask, 1))
+
+ if (valuator_mask_isset(mask, 1) || oy != y)
valuator_mask_set(mask, 1, y);
}