wayland: #ifdef on XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION

This enables us to compile against wayland-protocols < 1.25
This commit is contained in:
Daniel Eklöf 2022-08-12 16:12:36 +02:00
parent 1cf22846a0
commit 5697348b46
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 0 deletions

View file

@ -50,6 +50,10 @@
### Deprecated
### Removed
### Fixed
* Compiling against wayland-protocols < 1.25
### Security
### Contributors

View file

@ -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