summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}