summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 14:02:17 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 16:18:59 +1000
commitb5ef88c911f697530ddc2c7302fce15ba2ead4b2 (patch)
tree8fb5f3f8db203c2651f7f89af5b80ca3970353d6
parentea567b675f814ac41e75f1ed8ded0ac3e9d552a8 (diff)
dix: clip absolute axes depending on their mode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/getevents.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index bbad692d1..6bec39c33 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -767,9 +767,11 @@ moveRelative(DeviceIntPtr dev, int *x, int *y, ValuatorMask *mask)
/* if attached, clip both x and y to the defined limits (usually
* co-ord space limit). If it is attached, we need x/y to go over the
* limits to be able to change screens. */
- if(dev->u.master && dev->valuator->mode == Absolute) {
- clipAxis(dev, 0, x);
- clipAxis(dev, 1, y);
+ if(dev->u.master) {
+ if (valuator_get_mode(dev, 0) == Absolute)
+ clipAxis(dev, 0, x);
+ if (valuator_get_mode(dev, 1) == Absolute)
+ clipAxis(dev, 1, y);
}
/* calc other axes, clip, drop back into valuators */