wayland: The rest of the wayland-client 1.18 requirement... Git, please
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 90d0937..8dcb392 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -632,7 +632,7 @@ endmacro()
# - HAVE_SDL_LOADSO opt
macro(CheckWayland)
if(SDL_WAYLAND)
- pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
+ pkg_check_modules(WAYLAND "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
if(WAYLAND_FOUND)
find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
diff --git a/configure.ac b/configure.ac
index 28d620d..25b6e9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1555,7 +1555,7 @@ CheckWayland()
video_wayland=no
if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
+ if $PKG_CONFIG --exists 'wayland-client >= 1.18' wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
index fa29bed..b28e826 100644
--- a/src/video/wayland/SDL_waylandsym.h
+++ b/src/video/wayland/SDL_waylandsym.h
@@ -72,18 +72,15 @@ SDL_WAYLAND_SYM(void, wl_list_remove, (struct wl_list *))
SDL_WAYLAND_SYM(int, wl_list_length, (const struct wl_list *))
SDL_WAYLAND_SYM(int, wl_list_empty, (const struct wl_list *))
SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *))
-
-/* These functions are available in Wayland >= 1.4 */
-SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))
-
-SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...))
-
-SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_18)
SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
+/* These were introduced in 1.20 and introduce a handful of build issues.
+ * See GitHub #5376 and #4636
+ * -flibit
+ */
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_20)
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interfac, uint32_t version, uint32_t flags, ...))
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_array_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, uint32_t flags, union wl_argument *args))
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index 61940cc..c9c28bb 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -133,32 +133,22 @@ static const char *SDL_WAYLAND_output_tag = "sdl-output";
void SDL_WAYLAND_register_surface(struct wl_surface *surface)
{
- if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
- wl_proxy_set_tag((struct wl_proxy *)surface, &SDL_WAYLAND_surface_tag);
- }
+ wl_proxy_set_tag((struct wl_proxy *)surface, &SDL_WAYLAND_surface_tag);
}
void SDL_WAYLAND_register_output(struct wl_output *output)
{
- if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
- wl_proxy_set_tag((struct wl_proxy *)output, &SDL_WAYLAND_output_tag);
- }
+ wl_proxy_set_tag((struct wl_proxy *)output, &SDL_WAYLAND_output_tag);
}
SDL_bool SDL_WAYLAND_own_surface(struct wl_surface *surface)
{
- if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
- return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
- }
- return SDL_TRUE; /* For older clients we have to assume this is us... */
+ return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
}
SDL_bool SDL_WAYLAND_own_output(struct wl_output *output)
{
- if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
- return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag;
- }
- return SDL_TRUE; /* For older clients we have to assume this is us... */
+ return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag;
}
static void