From 5ef6ca21ab9e1cf4f69254234d190a634b777d52 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 09:38:31 +0300 Subject: Remove deprecated Cocoa OpenGL and private compatibility APIs --- tests/cocoa/test_ownership.m | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'tests/cocoa/test_ownership.m') diff --git a/tests/cocoa/test_ownership.m b/tests/cocoa/test_ownership.m index 4efd164..10aae99 100644 --- a/tests/cocoa/test_ownership.m +++ b/tests/cocoa/test_ownership.m @@ -3,6 +3,7 @@ #include "common/backend.h" #import #import +#import #include "common/types.h" #include #include @@ -41,16 +42,8 @@ int main(void) assert(!hidden.isVisible && hidden.styleMask == NSWindowStyleMaskBorderless); yasl_private_surface_destroy(gpu); - struct yasl_surface *gl = d->ops->surface_create_gl(d, &gpu_spec, NULL, NULL); - if (gl) { - assert(gl->presenter == YASL_PRIVATE_PRESENTER_GL); - assert(d->ops->gl_make_current(d, gl)); - assert(d->ops->gl_get_proc_address(d, "glClear") != NULL); - assert(d->ops->gl_swap_interval(d, gl, 1)); - assert(d->ops->gl_swap_buffers(d, gl)); - assert(d->ops->gl_make_current(d, NULL)); - d->ops->surface_destroy(gl); - } + assert(!d->ops->surface_create_gl && !d->ops->gl_make_current && + !d->ops->gl_get_proc_address && !d->ops->gl_swap_interval && !d->ops->gl_swap_buffers); assert(yasl_private_surface_set_size(s, (struct yasl_private_vector2i){180, 110})); assert(yasl_private_surface_set_fullscreen(s, false)); @@ -58,7 +51,7 @@ int main(void) assert(!yasl_private_surface_set_size(s, (struct yasl_private_vector2i){0, 100})); assert(errno == EINVAL); struct yasl_private_popup_spec popup_spec = { - .positioner_explicit = true, + .anchor_edges = 4, .gravity = 3, .constraints = 63, .size = {80, 40}, .anchor = {10, 10, 2, 2}, }; @@ -117,7 +110,7 @@ int main(void) } const char *last = event.paste.data; assert(!yasl_private_display_poll_event(d, &event)); - @autoreleasepool { yasl_private_display_copy(d, YASL_PRIVATE_CLIPBOARD, "new selection"); } + @autoreleasepool { yasl_private_clipboard_set(d, YASL_PRIVATE_CLIPBOARD, "new selection"); } assert(strcmp(last, "paste-599") == 0); assert(!yasl_private_clipboard_set(d, YASL_PRIVATE_CLIPBOARD, "\xc3")); assert(errno == EILSEQ); @@ -131,11 +124,6 @@ int main(void) assert(unavailable_id && yasl_private_display_poll_event(d, &event)); assert(event.type == YASL_PRIVATE_EVENT_PASTE && event.paste.request_id == unavailable_id); assert(event.paste.status == YASL_PRIVATE_TRANSFER_UNAVAILABLE && !event.paste.len); - yasl_private_display_copy(d, YASL_PRIVATE_CLIPBOARD, "legacy paste"); - yasl_private_display_paste(d, YASL_PRIVATE_CLIPBOARD, s); - assert(yasl_private_display_poll_event(d, &event)); - assert(event.type == YASL_PRIVATE_EVENT_PASTE && event.paste.request_id == 0); - assert(event.paste.status == YASL_PRIVATE_TRANSFER_OK && strcmp(event.text.data, "legacy paste") == 0); yasl_private_surface_destroy(s); yasl_private_display_close(d); return 0; -- cgit v1.2.3