summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-16 14:18:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-18 14:41:49 +1000
commit87d1f44bad608507e3995e17eb84fa0a0119796c (patch)
treeb865e8ab523490311a6703706ef8666f446245cd
parenta30fef9956b296f59ea18a9ee38d0abafeb15a4e (diff)
Xi: copy the button and axes labels into the XIQueryDevice reply.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--Xi/xiquerydevice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index cc5781509..bc3088855 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -34,6 +34,7 @@
#include "inputstr.h"
#include <X11/X.h>
+#include <X11/Xatom.h>
#include <X11/extensions/XI2proto.h>
#include "xkbstr.h"
#include "xkbsrv.h"
@@ -240,8 +241,8 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
for (i = 0; dev && dev->button && i < dev->button->numButtons; i++)
if (BitIsOn(dev->button->down, i))
SetBit(bits, i);
-
- /** XXX: button labels */
+ bits += mask_len * 4;
+ memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom));
return info->length * 4;
}
@@ -313,7 +314,7 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber)
info->type = ValuatorClass;
info->length = sizeof(xXIValuatorInfo)/4;
- info->name = XIGetKnownProperty(AXIS_LABEL_PROP_REL_MISC); /* XXX */
+ info->name = v->axes[axisnumber].label;
info->min.integral = v->axes[axisnumber].min_value;
info->min.frac = 0;
info->max.integral = v->axes[axisnumber].max_value;