summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-18 17:11:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commit8473e441b0f832775153281bc3df5e2d4feb2b36 (patch)
tree7a5d8156ea9331517179154ec90c7c6c34f690df /test
parente3f6a76dd480717eae4b17ad8e2ff707de2ffe4c (diff)
dix: add ScrollInfo to DeviceChangedEvents
3304bbff9b4ed63f1a47410a5320a136420ba2c6 added smooth scrolling support for pointer events and for XIQueryDevice but didn't add the matching parts to XIDeviceChangedEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'test')
-rw-r--r--test/xi2/protocol-eventconvert.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index bfa23b51f..41a3001ad 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -748,6 +748,26 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
}
break;
+ case XIScrollClass:
+ {
+ xXIScrollInfo *s = (xXIScrollInfo*)any;
+ assert(s->length ==
+ bytes_to_int32(sizeof(xXIScrollInfo)));
+
+ assert(s->sourceid == in->sourceid);
+ assert(s->number < in->num_valuators);
+ switch(s->type)
+ {
+ case XIScrollTypeVertical:
+ assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_VERTICAL);
+ break;
+ case XIScrollTypeHorizontal:
+ assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_HORIZONTAL);
+ break;
+ }
+ if (s->flags & XIScrollFlagPreferred)
+ assert(in->valuators[s->number].scroll.flags & SCROLL_FLAG_PREFERRED);
+ }
default:
printf("Invalid class type.\n\n");
assert(1);