aboutsummaryrefslogtreecommitdiff
path: root/wayland.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-11 15:58:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-14 11:26:13 +0000
commit03e1b906abc6b29bb4b76b6e0429b8da9e2e2c0e (patch)
treed66667f97301a0395c591d9062f8a5d67fed333b /wayland.h
parentpgo: add wayl_win_set_urgent() stub (diff)
meson: add xdg-activation-v1.xml conditionally
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.
Diffstat (limited to 'wayland.h')
-rw-r--r--wayland.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/wayland.h b/wayland.h
index dd6637cd..4ec09544 100644
--- a/wayland.h
+++ b/wayland.h
@@ -12,11 +12,14 @@
#include <presentation-time.h>
#include <primary-selection-unstable-v1.h>
#include <text-input-unstable-v3.h>
-#include <xdg-activation-v1.h>
#include <xdg-decoration-unstable-v1.h>
#include <xdg-output-unstable-v1.h>
#include <xdg-shell.h>
+#if defined(HAVE_XDG_ACTIVATION)
+ #include <xdg-activation-v1.h>
+#endif
+
#include <tllist.h>
#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;