Technically we're not really waiting here since we expect the
event to already be there but for these tests the distinction doesn't
matter.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
struct libinput *li = dev->libinput;
struct libinput_device *device = dev->libinput_device;
- ck_assert_int_ne(libinput_next_event_type(li),
- LIBINPUT_EVENT_NONE);
+ litest_wait_for_event(li);
ck_assert(libinput_device_has_capability(device,
LIBINPUT_DEVICE_CAP_TOUCH));
litest_dispatch(li);
- ck_assert_int_ne(libinput_next_event_type(li),
- LIBINPUT_EVENT_NONE);
+ litest_wait_for_event(li);
while ((event = libinput_get_event(li)) != NULL) {
ck_assert_int_eq(libinput_event_get_type(event),
LIBINPUT_EVENT_POINTER_MOTION);