From f8ffded1e59d9e723d830b5a445ca386ea31ec21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 3 Sep 2010 15:15:33 -0400 Subject: [PATCH] Drop wl_display_set_compositor() special case --- compositor.c | 8 +++++++- wayland-server.c | 15 --------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/compositor.c b/compositor.c index a805f8c0..8bf64850 100644 --- a/compositor.c +++ b/compositor.c @@ -1376,7 +1376,13 @@ wlsc_compositor_init(struct wlsc_compositor *ec, struct wl_display *display) ec->wl_display = display; - wl_display_set_compositor(display, &ec->base, &compositor_interface); + ec->base.base.interface = &wl_compositor_interface; + ec->base.base.implementation = + (void (**)(void)) &compositor_interface; + + wl_display_add_object(display, &ec->base.base); + if (wl_display_add_global(display, &ec->base.base, NULL)) + return -1; ec->shell.base.interface = &wl_shell_interface; ec->shell.base.implementation = (void (**)(void)) &shell_interface; diff --git a/wayland-server.c b/wayland-server.c index db8bf749..ac87bb30 100644 --- a/wayland-server.c +++ b/wayland-server.c @@ -282,21 +282,6 @@ wl_client_destroy(struct wl_client *client) free(client); } -WL_EXPORT int -wl_display_set_compositor(struct wl_display *display, - struct wl_compositor *compositor, - const struct wl_compositor_interface *implementation) -{ - compositor->base.interface = &wl_compositor_interface; - compositor->base.implementation = (void (**)(void)) implementation; - - wl_display_add_object(display, &compositor->base); - if (wl_display_add_global(display, &compositor->base, NULL)) - return -1; - - return 0; -} - static void display_sync(struct wl_client *client, struct wl_display *display, uint32_t key)