Hi Jonas, On 24 June 2016 at 03:46, Jonas Ã…dahl <jad...@gmail.com> wrote: > @@ -74,9 +74,8 @@ roundtrip(struct dri2_egl_display *dri2_dpy) > struct wl_callback *callback; > int done = 0, ret = 0; > > - callback = wl_display_sync(dri2_dpy->wl_dpy); > + callback = wl_display_sync(dri2_dpy->wl_dpy_wrapper); > wl_callback_add_listener(callback, &sync_listener, &done); > - wl_proxy_set_queue((struct wl_proxy *) callback, dri2_dpy->wl_queue); > while (ret != -1 && !done) > ret = wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_dpy->wl_queue);
If we're bumping the libwayland-client dep anyway, might as well just make this use wl_display_roundtrip_queue. > @@ -1235,6 +1237,10 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, > _EGLDisplay *disp) > wl_drm_destroy(dri2_dpy->wl_drm); > cleanup_registry: > wl_registry_destroy(dri2_dpy->wl_registry); > + wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper); > + cleanup_dpy_wrapper: > + if (dri2_dpy->wl_dpy != disp->PlatformDisplay) > + wl_display_disconnect(dri2_dpy->wl_dpy); > wl_event_queue_destroy(dri2_dpy->wl_queue); > cleanup_dpy: > free(dri2_dpy); Adding wl_display_disconnect should be a separate change, and in any case needs to come after wl_event_queue_destroy to avoid a use-after-free. With those fixed, assuming we're fine with an increased hard dep: Reviewed-by: Daniel Stone <dani...@collabora.com> Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev