/** Close a connection to a Wayland display * * \param display The display context object * * Close the connection to \c display and free all resources associated * with it. * * \memberof wl_display */ WL_EXPORT void wl_display_disconnect(struct wl_display *display) { wl_connection_destroy(display->connection); wl_map_release(&display->objects); wl_event_queue_release(&display->queue); pthread_mutex_destroy(&display->mutex); pthread_cond_destroy(&display->reader_cond); close(display->fd); free(display); }
WL_EXPORT void wl_display_destroy(struct wl_display *display) { while (display->global_objects) { struct wl_proxy *next = display->global_objects->next; /* Watch out, the display itself is one of the global objects. */ if (display->global_objects != &display->proxy) free (display->global_objects); display->global_objects = next; } wl_backend_destroy(display->backend); wl_connection_destroy(display->connection); close(display->fd); free(display); }
static void release_marshal_data(struct marshal_data *data) { close(wl_connection_destroy(data->read_connection)); close(wl_connection_destroy(data->write_connection)); }