summaryrefslogtreecommitdiff
path: root/tests/wayland/test_reconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wayland/test_reconnect.c')
-rw-r--r--tests/wayland/test_reconnect.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/wayland/test_reconnect.c b/tests/wayland/test_reconnect.c
index 891d98b..6bd6967 100644
--- a/tests/wayland/test_reconnect.c
+++ b/tests/wayland/test_reconnect.c
@@ -55,7 +55,7 @@ static VkSurfaceKHR vulkan_surface(void)
int main(void)
{
- CHECK(yasl_init(YASL_BACKEND_WAYLAND, NULL) == 0, "selecting Wayland");
+ CHECK(yasl_init(&(struct yasl_options){.backend = YASL_BACKEND_WAYLAND}) == 0, "selecting Wayland");
cpu = yasl_surface_create(&(struct yasl_surface_options){.title="reconnect CPU", .width=160, .height=120});
CHECK(cpu, "creating CPU window");
gl = yasl_surface_create(&(struct yasl_surface_options){.title="reconnect GL", .width=160, .height=120, .type=YASL_SURFACE_GL});
@@ -84,7 +84,8 @@ int main(void)
puts("ready");
fflush(stdout);
- expect(YASL_EVENT_DISPLAY_LOST, NULL, 10000);
+ yasl_event lost = expect(YASL_EVENT_DISPLAY_LOST, NULL, 10000);
+ CHECK(lost.action == YASL_LOST_RECONNECTING, "reporting a loss that reconnects");
struct yasl_native native;
CHECK(yasl_surface_get_native(cpu, &native) == -ENOTCONN && !native.wl_display && !native.wl_surface,
"rejecting native handles while offline");