aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
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:15:53 +0000
commit5697348b461f4dec4daf67c62336bb357149baf7 (patch)
tree566c81aea8f6ab34addd3b9134b111f7ee71a8dd /wayland.c
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
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c4
1 files changed, 4 insertions, 0 deletions
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