From 1521c62a31664d7372f5a987bd7f34574bd0c7d6 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 4 Dec 2013 16:58:39 -0800 Subject: [PATCH] client: Make wl_proxy_set_queue() with NULL revert to default queue This will be useful in order to implement the EGL_WL_create_wayland_buffer_from_image extension. The buffers created within Mesa's Wayland platform are created using the the wl_drm object as a proxy factory which means they will be set to use Mesa's internal event queue. However, these buffers will be owned by the client application so they ideally need to use the default event loop. This function provides a way to set the proxy's event queue back to the default. krh: Edited from Neils original patch to just use wl_proxy_set_queue() with a NULL argument instead of introducing a new function. --- src/wayland-client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 1486b73c..ab79b7b3 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -1572,7 +1572,10 @@ wl_proxy_get_class(struct wl_proxy *proxy) WL_EXPORT void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue) { - proxy->queue = queue; + if (queue) + proxy->queue = queue; + else + proxy->queue = &proxy->display->queue; } WL_EXPORT void