[PATCH libinput 3/7] test: Queue two motion events in pointer event conversion test
Jonas Ådahl
jadahl at gmail.com
Mon May 26 14:27:26 PDT 2014
Pointer acceleration filters may absorb the first event, so queue two,
just in case.
Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
---
test/misc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/misc.c b/test/misc.c
index 5bf9477..f2088ca 100644
--- a/test/misc.c
+++ b/test/misc.c
@@ -158,6 +158,11 @@ START_TEST(event_conversion_pointer)
li = libinput_path_create_context(&simple_interface, NULL);
libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput));
+ /* Queue at least two relative motion events as the first one may
+ * be absorbed by the pointer acceleration filter. */
+ libevdev_uinput_write_event(uinput, EV_REL, REL_X, -1);
+ libevdev_uinput_write_event(uinput, EV_REL, REL_Y, -1);
+ libevdev_uinput_write_event(uinput, EV_SYN, SYN_REPORT, 0);
libevdev_uinput_write_event(uinput, EV_REL, REL_X, -1);
libevdev_uinput_write_event(uinput, EV_REL, REL_Y, -1);
libevdev_uinput_write_event(uinput, EV_KEY, BTN_LEFT, 1);
--
1.9.1
More information about the wayland-devel
mailing list