Add patch defining WL_SUBCOMPOSITOR_ERROR_BAD_PARENT for wayland < 1.22;

applied only on EL9 (which ships wayland 1.21).
This commit is contained in:
Anders da Silva Rytter Hansen 2026-09-15 17:48:11 +02:00
commit 4a34f37718
2 changed files with 29 additions and 2 deletions

View file

@ -0,0 +1,17 @@
diff --git a/src/subsurface.c b/src/subsurface.c
--- a/src/subsurface.c
+++ b/src/subsurface.c
@@ -23,6 +23,13 @@
#include "compositor.h"
+#include <wayland-version.h>
+
+/* wayland < 1.22 lacks wl_subcompositor's bad_parent error. */
+#if WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR < 22
+#define WL_SUBCOMPOSITOR_ERROR_BAD_PARENT 1
+#endif
+
enum
{
PendingPosition = 1,