[PATCH libinput 06/24] tests: drain events before testing scroll events in test-pointer

Carlos Garnacho carlosg at gnome.org
Mon Apr 21 10:11:15 PDT 2014


This is so LIBINPUT_EVENT_POINTER_AXIS_FRAME events remaining from
previous tests are discarded.

Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
 test/pointer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/pointer.c b/test/pointer.c
index 59fe818..ecb7dbd 100644
--- a/test/pointer.c
+++ b/test/pointer.c
@@ -137,6 +137,8 @@ test_wheel_event(struct litest_device *dev, int which, int amount)
 	const int scroll_step = 10;
 	int expected = amount * scroll_step;
 
+	litest_drain_events(li);
+
 	/* mouse scroll wheels are 'upside down' */
 	if (which == REL_WHEEL)
 		amount *= -1;
-- 
1.9.0



More information about the wayland-devel mailing list