[PATCH weston v1 13/17] tests: make frame_callback_wait universal
Marek Chalupa
mchqwerty at gmail.com
Fri Dec 5 05:36:46 PST 2014
frame_callback_wait uses wl_display_dispatch. Use display_dispatch
for toytoolkit clients.
Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
---
tests/weston-test-client-helper.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index ae104a8..dc34fc4 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -70,11 +70,20 @@ frame_callback_set(struct wl_surface *surface, int *done)
return callback;
}
+static int
+client_dispatch(struct client *client)
+{
+ if (client->toytoolkit)
+ return display_dispatch(client->toytoolkit->display, -1);
+ else
+ return wl_display_dispatch(client->wl_display);
+}
+
int
frame_callback_wait_nofail(struct client *client, int *done)
{
while (!*done) {
- if (wl_display_dispatch(client->wl_display) < 0)
+ if (client_dispatch(client) < 0)
return 0;
}
--
2.1.0
More information about the wayland-devel
mailing list