diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 15:41:39 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 15:41:39 +0300 |
| commit | 482f799d356a8fbb8f585c4de7cc0992b8dc6fd3 (patch) | |
| tree | 85551a69e3c356da7b9b514224e25a6c2f8d29b9 /tests/wayland/test_cursor.c | |
| parent | 537b2d768b31deb0f95c5122e0d562e4406ae9a0 (diff) | |
Migrate tests to the unified event API
Port backend, input, tablet and app tests from yasl_input_event and
YASL_INPUT_* to struct yasl_event and YASL_EVENT_*. The input allocation
test links input.c on its own, so it stubs yasl_loop_now_ns() for the new
event timestamps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/wayland/test_cursor.c')
| -rw-r--r-- | tests/wayland/test_cursor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/wayland/test_cursor.c b/tests/wayland/test_cursor.c index a4a522e..eb729a3 100644 --- a/tests/wayland/test_cursor.c +++ b/tests/wayland/test_cursor.c @@ -76,14 +76,14 @@ int main(void) pointer_frame(&seat, seat.pointer); tablet_tool_motion(&tool, tool.proxy, wl_fixed_from_int(56), wl_fixed_from_int(78)); tool_frame(&tool, tool.proxy, 0); - struct yasl_input_event event; - assert(yasl_surface_input_poll(&surface.base, &event)); - assert(event.kind == YASL_INPUT_MOUSE && event.mouse.device == YASL_PTR_DEV_MOUSE); - assert(event.mouse.pos.x == 12 && event.mouse.pos.y == 34); - assert(yasl_surface_input_poll(&surface.base, &event)); - assert(event.kind == YASL_INPUT_MOUSE && event.mouse.device == YASL_PTR_DEV_PEN); - assert(event.mouse.pos.x == 56 && event.mouse.pos.y == 78); - assert(!yasl_surface_input_poll(&surface.base, &event)); + struct yasl_event event; + assert(yasl_surface_poll_event(&surface.base, &event)); + assert(event.type == YASL_EVENT_POINTER_MOTION && event.pointer.device == YASL_PTR_DEV_MOUSE); + assert(event.pointer.pos.x == 12 && event.pointer.pos.y == 34); + assert(yasl_surface_poll_event(&surface.base, &event)); + assert(event.type == YASL_EVENT_POINTER_MOTION && event.pointer.device == YASL_PTR_DEV_PEN); + assert(event.pointer.pos.x == 56 && event.pointer.pos.y == 78); + assert(!yasl_surface_poll_event(&surface.base, &event)); /* Each new entry needs a request with its own serial. */ pointer_leave(&seat, seat.pointer, 12, surface.surface); |
