diff --git a/src/wayland-shm.c b/src/wayland-shm.c index 0d3c95c2..16990582 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -258,7 +258,7 @@ bind_shm(struct wl_client *client, WL_EXPORT int wl_display_init_shm(struct wl_display *display) { - if (!wl_display_add_global(display, &wl_shm_interface, NULL, bind_shm)) + if (!wl_global_create(display, &wl_shm_interface, 1, NULL, bind_shm)) return -1; return 0; diff --git a/tests/queue-test.c b/tests/queue-test.c index 3abb71f1..87147c16 100644 --- a/tests/queue-test.c +++ b/tests/queue-test.c @@ -266,8 +266,9 @@ TEST(queue) } for (i = 0; i < ARRAY_LENGTH(dummy_interfaces); i++) - wl_display_add_global(display.display, dummy_interfaces[i], - NULL, dummy_bind); + wl_global_create(display.display, dummy_interfaces[i], + dummy_interfaces[i]->version, + NULL, dummy_bind); ret = wl_display_add_socket(display.display, SOCKET_NAME); assert(ret == 0);