summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-16 10:51:52 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-18 14:40:54 +1000
commitcbeb73e2055f6c013c8fe6325851f2631170137d (patch)
tree1f6651bf46f85fd82a642c18e7dcccba6ca4f323
parent80837dbefd9d5e96ab5c1f4b4c2d5c66ce17ce67 (diff)
Xi: return current valuator values in XIQueryDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--Xi/xiquerydevice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 2c01863bb..2e480f5b8 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -324,6 +324,8 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber)
info->min.frac = 0;
info->max.integral = v->axes[axisnumber].max_value;
info->max.frac = 0;
+ info->value.integral = (int)v->axisVal[axisnumber];
+ info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
info->resolution = v->axes[axisnumber].resolution;
info->number = axisnumber;
info->mode = v->mode; /* Server doesn't have per-axis mode yet */