summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/list.c24
-rw-r--r--src/test_xi2.c11
2 files changed, 35 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index 236011e..64848e3 100644
--- a/src/list.c
+++ b/src/list.c
@@ -201,6 +201,30 @@ print_classes_xi2(Display* display, XIAnyClassInfo **classes,
XFree(name);
}
break;
+#if HAVE_XI21
+ case XIScrollClass:
+ {
+ XIScrollClassInfo *s = (XIScrollClassInfo*)classes[i];
+
+ printf("XIScrollClass\n");
+ printf("\t\tScroll info for Valuator %d\n", s->number);
+ printf("\t\t type: %d (%s)\n", s->scroll_type,
+ (s->scroll_type == XIScrollTypeHorizontal) ? "horizontal" :
+ (s->scroll_type == XIScrollTypeVertical) ? "vertical" : "unknown");
+ printf("\t\t increment: %f\n", s->increment);
+ printf("\t\t flags: 0x%x", s->flags);
+ if (s->flags) {
+ printf(" (");
+ if (s->flags & XIScrollFlagNoEmulation)
+ printf(" no-emulation ");
+ if (s->flags & XIScrollFlagPreferred)
+ printf(" preferred ");
+ printf(")");
+ }
+ printf("\n");
+ }
+ break;
+#endif
}
}
diff --git a/src/test_xi2.c b/src/test_xi2.c
index 92c88da..4a6c3b6 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -53,11 +53,13 @@ static void print_deviceevent(XIDeviceEvent* event)
case XI_KeyRelease:
printf(" flags: %s\n", (event->flags & XIKeyRepeat) ? "repeat" : "");
break;
+#if HAVE_XI21
case XI_ButtonPress:
case XI_ButtonRelease:
case XI_Motion:
printf(" flags: %s\n", (event->flags & XIPointerEmulated) ? "emulated" : "");
break;
+#endif
}
printf(" root: %.2f/%.2f\n", event->root_x, event->root_y);
@@ -148,6 +150,15 @@ static void print_rawevent(XIRawEvent *event)
printf(" device: %d\n", event->deviceid);
printf(" detail: %d\n", event->detail);
printf(" valuators:\n");
+#if HAVE_XI21
+ switch(event->evtype) {
+ case XI_RawButtonPress:
+ case XI_RawButtonRelease:
+ case XI_RawMotion:
+ printf(" flags: %s\n", (event->flags & XIPointerEmulated) ? "emulated" : "");
+ break;
+ }
+#endif
val = event->valuators.values;
raw_val = event->raw_values;