[PATCH weston 08/10] tests: Handle screenshot done event in weston-test

Bryce Harrington bryce at osg.samsung.com
Wed May 6 17:44:27 PDT 2015


Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
 tests/weston-test-client-helper.c | 10 ++++++++++
 tests/weston-test-client-helper.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index 017338d..bd1f953 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -447,9 +447,19 @@ test_handle_n_egl_buffers(void *data, struct weston_test *weston_test, uint32_t
 	test->n_egl_buffers = n;
 }
 
+static void
+test_handle_capture_screenshot_done(void *data, struct weston_test *weston_test)
+{
+	struct test *test = data;
+
+	printf("Screenshot has been captured\n");
+	test->buffer_copy_done = 1;
+}
+
 static const struct weston_test_listener test_listener = {
 	test_handle_pointer_position,
 	test_handle_n_egl_buffers,
+	test_handle_capture_screenshot_done,
 };
 
 static void
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index 9732b9f..a0fbe82 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -65,6 +65,7 @@ struct test {
 	int pointer_x;
 	int pointer_y;
 	uint32_t n_egl_buffers;
+	int buffer_copy_done;
 };
 
 struct input {
-- 
1.9.1



More information about the wayland-devel mailing list