loader/wayland: Add named queue fallback
If libwayland isn't new enough to create event queues with names, just throw away the name. It's just a debug feature anyway. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
This commit is contained in:
@@ -133,3 +133,11 @@ wl_display_dispatch_queue_timeout(struct wl_display *display,
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WL_CREATE_QUEUE_WITH_NAME
|
||||
struct wl_event_queue *
|
||||
wl_display_create_queue_with_name(struct wl_display *display, const char *name)
|
||||
{
|
||||
return wl_display_create_queue(display);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
#ifndef LOADER_WAYLAND_HELPER_HEADER_H
|
||||
#define LOADER_WAYLAND_HELPER_HEADER_H
|
||||
|
||||
#include <wayland-client.h>
|
||||
|
||||
#ifndef HAVE_WL_DISPATCH_QUEUE_TIMEOUT
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <util/timespec.h>
|
||||
int
|
||||
wl_display_dispatch_queue_timeout(struct wl_display *display,
|
||||
@@ -33,4 +34,10 @@ wl_display_dispatch_queue_timeout(struct wl_display *display,
|
||||
const struct timespec *deadline);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WL_CREATE_QUEUE_WITH_NAME
|
||||
struct wl_event_queue *
|
||||
wl_display_create_queue_with_name(struct wl_display *display,
|
||||
const char *name);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user