From 7605f192d55579febf9a336c38e4657654a96268 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Fri, 6 Mar 2026 10:51:47 -0500
Subject: [PATCH] wayland: Remove Wayland interface definitions
These are relics from very long ago, before the Wayland protocols lived in-tree and the headers and sources were generated at configure time.
---
src/video/wayland/SDL_waylanddyn.c | 4 ----
src/video/wayland/SDL_waylanddyn.h | 16 ----------------
src/video/wayland/SDL_waylandsym.h | 21 ---------------------
3 files changed, 41 deletions(-)
diff --git a/src/video/wayland/SDL_waylanddyn.c b/src/video/wayland/SDL_waylanddyn.c
index f95404337a672..8040b9bbfd4e7 100644
--- a/src/video/wayland/SDL_waylanddyn.c
+++ b/src/video/wayland/SDL_waylanddyn.c
@@ -130,7 +130,6 @@ static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, bool required)
#define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
#define SDL_WAYLAND_SYM(rc, fn, params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
#define SDL_WAYLAND_SYM_OPT(rc, fn, params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
-#define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL;
#include "SDL_waylandsym.h"
static int wayland_load_refcount = 0;
@@ -148,7 +147,6 @@ void SDL_WAYLAND_UnloadSymbols(void)
#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 0;
#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = NULL;
#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = NULL;
-#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = NULL;
#include "SDL_waylandsym.h"
#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
@@ -189,7 +187,6 @@ bool SDL_WAYLAND_LoadSymbols(void)
#define SDL_WAYLAND_MODULE(modname) thismod = &SDL_WAYLAND_HAVE_##modname;
#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn)WAYLAND_GetSym(#fn, thismod, true);
#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn)WAYLAND_GetSym(#fn, thismod, false);
-#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = (struct wl_interface *)WAYLAND_GetSym(#iface, thismod, true);
#include "SDL_waylandsym.h"
if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT &&
@@ -209,7 +206,6 @@ bool SDL_WAYLAND_LoadSymbols(void)
#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; // default yes
#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = fn;
#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = fn;
-#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = &iface;
#include "SDL_waylandsym.h"
#endif
diff --git a/src/video/wayland/SDL_waylanddyn.h b/src/video/wayland/SDL_waylanddyn.h
index ddb0c12a41852..abcd1f18f988f 100644
--- a/src/video/wayland/SDL_waylanddyn.h
+++ b/src/video/wayland/SDL_waylanddyn.h
@@ -117,22 +117,6 @@ extern void SDL_WAYLAND_UnloadSymbols(void);
#define wl_proxy_marshal_array_flags (*WAYLAND_wl_proxy_marshal_array_flags)
#define wl_display_reconnect (*WAYLAND_wl_display_reconnect)
-#define wl_seat_interface (*WAYLAND_wl_seat_interface)
-#define wl_surface_interface (*WAYLAND_wl_surface_interface)
-#define wl_shm_pool_interface (*WAYLAND_wl_shm_pool_interface)
-#define wl_buffer_interface (*WAYLAND_wl_buffer_interface)
-#define wl_registry_interface (*WAYLAND_wl_registry_interface)
-#define wl_region_interface (*WAYLAND_wl_region_interface)
-#define wl_pointer_interface (*WAYLAND_wl_pointer_interface)
-#define wl_keyboard_interface (*WAYLAND_wl_keyboard_interface)
-#define wl_compositor_interface (*WAYLAND_wl_compositor_interface)
-#define wl_output_interface (*WAYLAND_wl_output_interface)
-#define wl_shm_interface (*WAYLAND_wl_shm_interface)
-#define wl_data_device_interface (*WAYLAND_wl_data_device_interface)
-#define wl_data_offer_interface (*WAYLAND_wl_data_offer_interface)
-#define wl_data_source_interface (*WAYLAND_wl_data_source_interface)
-#define wl_data_device_manager_interface (*WAYLAND_wl_data_device_manager_interface)
-
/*
* These must be included before libdecor.h, otherwise the libdecor header
* pulls in the system Wayland protocol headers instead of ours.
diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
index 3b471ac934c49..be15f533dfca5 100644
--- a/src/video/wayland/SDL_waylandsym.h
+++ b/src/video/wayland/SDL_waylandsym.h
@@ -33,10 +33,6 @@
#define SDL_WAYLAND_SYM_OPT(rc,fn,params)
#endif
-#ifndef SDL_WAYLAND_INTERFACE
-#define SDL_WAYLAND_INTERFACE(iface)
-#endif
-
SDL_WAYLAND_MODULE(WAYLAND_CLIENT)
SDL_WAYLAND_SYM(void, wl_proxy_marshal, (struct wl_proxy *, uint32_t, ...))
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_create, (struct wl_proxy *, const struct wl_interface *))
@@ -98,22 +94,6 @@ SDL_WAYLAND_SYM(int, wl_display_reconnect, (struct wl_display *))
#endif
#endif // 0
-SDL_WAYLAND_INTERFACE(wl_seat_interface)
-SDL_WAYLAND_INTERFACE(wl_surface_interface)
-SDL_WAYLAND_INTERFACE(wl_shm_pool_interface)
-SDL_WAYLAND_INTERFACE(wl_buffer_interface)
-SDL_WAYLAND_INTERFACE(wl_registry_interface)
-SDL_WAYLAND_INTERFACE(wl_region_interface)
-SDL_WAYLAND_INTERFACE(wl_pointer_interface)
-SDL_WAYLAND_INTERFACE(wl_keyboard_interface)
-SDL_WAYLAND_INTERFACE(wl_compositor_interface)
-SDL_WAYLAND_INTERFACE(wl_output_interface)
-SDL_WAYLAND_INTERFACE(wl_shm_interface)
-SDL_WAYLAND_INTERFACE(wl_data_device_interface)
-SDL_WAYLAND_INTERFACE(wl_data_source_interface)
-SDL_WAYLAND_INTERFACE(wl_data_offer_interface)
-SDL_WAYLAND_INTERFACE(wl_data_device_manager_interface)
-
SDL_WAYLAND_MODULE(WAYLAND_EGL)
SDL_WAYLAND_SYM(struct wl_egl_window *, wl_egl_window_create, (struct wl_surface *, int, int))
SDL_WAYLAND_SYM(void, wl_egl_window_destroy, (struct wl_egl_window *))
@@ -259,6 +239,5 @@ SDL_WAYLAND_SYM_OPT(enum libdecor_wm_capabilities, libdecor_frame_get_wm_capabil
#undef SDL_WAYLAND_MODULE
#undef SDL_WAYLAND_SYM
#undef SDL_WAYLAND_SYM_OPT
-#undef SDL_WAYLAND_INTERFACE
/* *INDENT-ON* */ // clang-format on