mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: add ScrollInfo to DeviceChangedEvents
3304bbff9b 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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user