backends/barrier: Guard X11 usage
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3540>
This commit is contained in:
parent
8922ada681
commit
b6f38b21b7
@ -13,11 +13,14 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user