diff --git a/src/wayland-client.c b/src/wayland-client.c index c007f4c1..625cd760 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -141,7 +141,8 @@ wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface) return proxy; } -WL_EXPORT struct wl_proxy * +/* The caller should hold the display lock */ +static struct wl_proxy * wl_proxy_create_for_id(struct wl_proxy *factory, uint32_t id, const struct wl_interface *interface) { @@ -159,9 +160,7 @@ wl_proxy_create_for_id(struct wl_proxy *factory, proxy->queue = factory->queue; proxy->id_deleted = 0; - pthread_mutex_lock(&display->mutex); wl_map_insert_at(&display->objects, id, proxy); - pthread_mutex_unlock(&display->mutex); return proxy; } diff --git a/src/wayland-client.h b/src/wayland-client.h index f0640102..cb1be9c7 100644 --- a/src/wayland-client.h +++ b/src/wayland-client.h @@ -39,9 +39,6 @@ void wl_event_queue_destroy(struct wl_event_queue *queue); void wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...); struct wl_proxy *wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface); -struct wl_proxy *wl_proxy_create_for_id(struct wl_proxy *factory, - uint32_t id, - const struct wl_interface *interface); void wl_proxy_destroy(struct wl_proxy *proxy); int wl_proxy_add_listener(struct wl_proxy *proxy,