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); }