summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-19 13:11:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-19 13:11:32 +1000
commitdcfa38899b2eae1beec9486063281ef0fb0bda76 (patch)
treebe1313d372992ffeb6f86bb4c0e85c0f11f234ee /src
parent2c5187d0099e6c7588828ba9931d27f5c64bbaec (diff)
Print the class type when listing devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'src')
-rw-r--r--src/list.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c
index b791e81..46b8bd8 100644
--- a/src/list.c
+++ b/src/list.c
@@ -146,13 +146,14 @@ print_classes_xi2(Display* display, XIAnyClassInfo **classes,
printf("\tReporting %d classes:\n", num_classes);
for (i = 0; i < num_classes; i++)
{
- printf("\t\tClass originated from: %d\n", classes[i]->sourceid);
+ printf("\t\tClass originated from: %d. Type: ", classes[i]->sourceid);
switch(classes[i]->type)
{
case XIButtonClass:
{
XIButtonClassInfo *b = (XIButtonClassInfo*)classes[i];
char *name;
+ printf("XIButtonClass\n");
printf("\t\tButtons supported: %d\n", b->num_buttons);
printf("\t\tButton labels:");
for (j = 0; j < b->num_buttons; j++)
@@ -173,6 +174,7 @@ print_classes_xi2(Display* display, XIAnyClassInfo **classes,
case XIKeyClass:
{
XIKeyClassInfo *k = (XIKeyClassInfo*)classes[i];
+ printf("XIKeyClass\n");
printf("\t\tKeycodes supported: %d\n", k->num_keycodes);
}
break;
@@ -184,6 +186,7 @@ print_classes_xi2(Display* display, XIAnyClassInfo **classes,
/* Bug in X servers 1.7..1.8.1, mode was | OutOfProximity */
v->mode &= DeviceMode;
+ printf("XIValuatorClass\n");
printf("\t\tDetail for Valuator %d:\n", v->number);
printf("\t\t Label: %s\n", (name) ? name : "None");
printf("\t\t Range: %f - %f\n", v->min, v->max);