From 03e1b906abc6b29bb4b76b6e0429b8da9e2e2c0e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 11 May 2021 17:58:40 +0200 Subject: meson: add xdg-activation-v1.xml conditionally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only enable XDG activation when compiling against wayland-protocols 1.21. Older versions don’t have this protocol. When available, define HAVE_XDG_ACTIVATION. Make all usages of xdg_activation_v1 and xdg_activation_token_v1 conditional. --- wayland.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'wayland.h') diff --git a/wayland.h b/wayland.h index dd6637cd..4ec09544 100644 --- a/wayland.h +++ b/wayland.h @@ -12,11 +12,14 @@ #include #include #include -#include #include #include #include +#if defined(HAVE_XDG_ACTIVATION) + #include +#endif + #include #include "fdm.h" @@ -383,7 +386,9 @@ struct wl_window { struct wl_surface *surface; struct xdg_surface *xdg_surface; struct xdg_toplevel *xdg_toplevel; +#if defined(HAVE_XDG_ACTIVATION) struct xdg_activation_token_v1 *xdg_activation_token; +#endif struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration; @@ -451,7 +456,9 @@ struct wayland { struct wl_data_device_manager *data_device_manager; struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager; +#if defined(HAVE_XDG_ACTIVATION) struct xdg_activation_v1 *xdg_activation; +#endif struct wp_presentation *presentation; uint32_t presentation_clock_id; -- cgit v1.3