summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 15:10:32 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-25 10:37:46 +1000
commit58554f1c6429535e7ab432c920aabca71a77edb8 (patch)
tree85446c3323f17f22e69be8830d67b40dbbf53b81
parentdd11f734a9a73bf34357c149d2809842938d57b5 (diff)
Convert some leftover axes->mode access to valuator_get_mode()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--Xi/xiquerydevice.c2
-rw-r--r--dix/getevents.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index c8b3d7e1b..fdd2c051d 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 6bec39c33..9b5e6dfe1 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);
}