aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-08-12 14:12:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-08-12 14:12:36 +0000
commiteafff70439c650dba288d0ac05cd009510bf6205 (patch)
tree566c81aea8f6ab34addd3b9134b111f7ee71a8dd
parentrender: apply a dimmed overlay while in Unicode input mode (diff)
wayland: #ifdef on XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
This enables us to compile against wayland-protocols < 1.25
-rw-r--r--CHANGELOG.md4
-rw-r--r--wayland.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e914e4d3..4c10be50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,6 +50,10 @@
### Deprecated
### Removed
### Fixed
+
+* Compiling against wayland-protocols < 1.25
+
+
### Security
### Contributors
diff --git a/wayland.c b/wayland.c
index fb41cf7d..05de79aa 100644
--- a/wayland.c
+++ b/wayland.c
@@ -706,6 +706,7 @@ xdg_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel)
term_shutdown(term);
}
+#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION)
static void
xdg_toplevel_configure_bounds(void *data,
struct xdg_toplevel *xdg_toplevel,
@@ -713,6 +714,7 @@ xdg_toplevel_configure_bounds(void *data,
{
/* TODO: ensure we don't pick a bigger size */
}
+#endif
#if defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
static void
@@ -742,7 +744,9 @@ xdg_toplevel_wm_capabilities(void *data,
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
.configure = &xdg_toplevel_configure,
/*.close = */&xdg_toplevel_close, /* epoll-shim defines a macro ‘close’... */
+#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION)
.configure_bounds = &xdg_toplevel_configure_bounds,
+#endif
#if defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
.wm_capabilities = xdg_toplevel_wm_capabilities,
#endif