[PATCH 4/9] dix: clip absolute axes depending on their mode.

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 21 23:29:31 PDT 2010


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/getevents.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index bbad692..6bec39c 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 */
-- 
1.7.2.3



More information about the xorg-devel mailing list