From 23204eca75af907b62e7f66c3bf57571fa8c1f75 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 26 Sep 2025 14:09:34 -0500 Subject: [PATCH] tests: Bind the fifo protocol Add the fifo protocol to the helper framework. Signed-off-by: Derek Foreman --- protocol/meson.build | 1 + tests/meson.build | 2 ++ tests/weston-test-client-helper.c | 7 +++++++ tests/weston-test-client-helper.h | 2 ++ 4 files changed, 12 insertions(+) diff --git a/protocol/meson.build b/protocol/meson.build index 94887d97b..384be5b11 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -17,6 +17,7 @@ install_data( generated_protocols = [ [ 'color-management', 'staging', 'v1' ], + [ 'fifo', 'staging', 'v1' ], [ 'fullscreen-shell', 'unstable', 'v1' ], [ 'fractional-scale', 'staging', 'v1' ], [ 'input-method', 'unstable', 'v1' ], diff --git a/tests/meson.build b/tests/meson.build index a1876b357..4f5d1b2a0 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -31,6 +31,8 @@ lib_test_client = static_library( 'weston-test-client-helper.c', 'weston-test-fixture-compositor.c', 'xdg-client-helper.c', + fifo_v1_client_protocol_h, + fifo_v1_protocol_c, presentation_time_client_protocol_h, presentation_time_protocol_c, single_pixel_buffer_v1_client_protocol_h, diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index 994e77c50..cbd3d8a7f 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -934,6 +934,10 @@ handle_global(void *data, struct wl_registry *registry, &weston_test_interface, version); weston_test_add_listener(test->weston_test, &test_listener, test); client->test = test; + } else if (strcmp(interface, wp_fifo_manager_v1_interface.name) == 0) { + client->fifo_manager = + wl_registry_bind(registry, id, + &wp_fifo_manager_v1_interface, 1); } } @@ -1201,6 +1205,9 @@ client_destroy(struct client *client) { int ret; + if (client->fifo_manager) + wp_fifo_manager_v1_destroy(client->fifo_manager); + if (client->surface) surface_destroy(client->surface); diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h index 1cfb3fbee..12b6d3236 100644 --- a/tests/weston-test-client-helper.h +++ b/tests/weston-test-client-helper.h @@ -44,6 +44,7 @@ #include "weston-output-capture-client-protocol.h" #include "xdg-shell-client-protocol.h" #include "weston-testsuite-data.h" +#include "fifo-v1-client-protocol.h" struct client { struct wl_display *wl_display; @@ -64,6 +65,7 @@ struct client { struct wp_viewporter *viewporter; struct test *test; + struct wp_fifo_manager_v1 *fifo_manager; /* the seat that is actually used for input events */ struct input *input; /* server can have more wl_seats. We need keep them all until we