summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-12-04 16:58:39 -0800
committerKristian Høgsberg <krh@bitplanet.net>2013-12-04 17:01:01 -0800
commit1521c62a31664d7372f5a987bd7f34574bd0c7d6 (patch)
tree5b455bcffce239988c8923a4a0085ffb02b46ba2
parent3b3e81f42e0bf05e606f40ac0145977766283548 (diff)
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.
-rw-r--r--src/wayland-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 1486b73..ab79b7b 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