From b6f38b21b742c57931ac69ba6508805fcf9e8654 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 22 Jan 2024 16:57:04 +0100 Subject: [PATCH] backends/barrier: Guard X11 usage Part-of: --- src/backends/meta-barrier.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backends/meta-barrier.c b/src/backends/meta-barrier.c index f17407a14..9a3913324 100644 --- a/src/backends/meta-barrier.c +++ b/src/backends/meta-barrier.c @@ -13,11 +13,14 @@ #include -#include "backends/x11/meta-backend-x11.h" -#include "backends/x11/meta-barrier-x11.h" #include "meta/meta-enum-types.h" #include "meta/util.h" +#ifdef HAVE_X11 +#include "backends/x11/meta-backend-x11.h" +#include "backends/x11/meta-barrier-x11.h" +#endif + #ifdef HAVE_NATIVE_BACKEND #include "backends/native/meta-backend-native.h" #include "backends/native/meta-barrier-native.h" @@ -276,9 +279,11 @@ init_barrier_impl (MetaBarrier *barrier) if (META_IS_BACKEND_NATIVE (priv->backend)) priv->impl = meta_barrier_impl_native_new (barrier); #endif +#ifdef HAVE_X11 if (META_IS_BACKEND_X11 (priv->backend) && !meta_is_wayland_compositor ()) priv->impl = meta_barrier_impl_x11_new (barrier); +#endif g_warn_if_fail (priv->impl); }