[PATCH 8/9] Convert somej leftover axes->mode access to valuator_get_mode()

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


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

diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index c8b3d7e..fdd2c05 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -349,7 +349,7 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
     info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
     info->resolution = v->axes[axisnumber].resolution;
     info->number = axisnumber;
-    info->mode = v->axes[axisnumber].mode;
+    info->mode = valuator_get_mode(dev, axisnumber);
     info->sourceid = v->sourceid;
 
     if (!reportState)
diff --git a/dix/getevents.c b/dix/getevents.c
index 6bec39c..9b5e6df 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -780,7 +780,7 @@ moveRelative(DeviceIntPtr dev, int *x, int *y, ValuatorMask *mask)
         if (valuator_mask_isset(mask, i))
         {
             dev->last.valuators[i] += valuator_mask_get(mask, i);
-            if (dev->valuator->axes[i].mode == Absolute)
+            if (valuator_get_mode(dev, i) == Absolute)
                 clipAxis(dev, i, &dev->last.valuators[i]);
             valuator_mask_set(mask, i, dev->last.valuators[i]);
         }
@@ -1252,7 +1252,7 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, const Valuato
     for (i = 0; i < valuator_mask_num_valuators(&mask); i++)
     {
         if (valuator_mask_isset(&mask, i) &&
-            pDev->valuator->axes[i].mode == Relative)
+            valuator_get_mode(pDev, i) == Relative)
             valuator_mask_unset(&mask, i);
     }
 
-- 
1.7.2.3



More information about the xorg-devel mailing list