diff --git a/src/core/meta-cursor-tracker-private.h b/src/core/meta-cursor-tracker-private.h index 773ac0020..7b92c6aa5 100644 --- a/src/core/meta-cursor-tracker-private.h +++ b/src/core/meta-cursor-tracker-private.h @@ -25,6 +25,7 @@ #define META_CURSOR_TRACKER_PRIVATE_H #include +#include gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker, XEvent *xevent); diff --git a/src/core/meta-cursor-tracker.c b/src/core/meta-cursor-tracker.c index 4a374d54d..41ecb69f0 100644 --- a/src/core/meta-cursor-tracker.c +++ b/src/core/meta-cursor-tracker.c @@ -39,7 +39,10 @@ #include "meta-cursor-tracker-private.h" #include "screen-private.h" + +#ifdef HAVE_WAYLAND #include "meta-wayland-private.h" +#endif #define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_X 7 #define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_Y 4 @@ -123,6 +126,7 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass) G_TYPE_NONE, 0); } +#ifdef HAVE_WAYLAND static MetaCursorTracker * make_wayland_cursor_tracker (MetaScreen *screen) { @@ -139,6 +143,7 @@ make_wayland_cursor_tracker (MetaScreen *screen) return self; } +#endif static MetaCursorTracker * make_x11_cursor_tracker (MetaScreen *screen) @@ -169,9 +174,11 @@ meta_cursor_tracker_get_for_screen (MetaScreen *screen) if (screen->cursor_tracker) return screen->cursor_tracker; +#ifdef HAVE_WAYLAND if (meta_is_wayland_compositor ()) self = make_wayland_cursor_tracker (screen); else +#endif self = make_x11_cursor_tracker (screen); screen->cursor_tracker = self; diff --git a/src/meta/meta-cursor-tracker.h b/src/meta/meta-cursor-tracker.h index 75199d666..c59c6cefb 100644 --- a/src/meta/meta-cursor-tracker.h +++ b/src/meta/meta-cursor-tracker.h @@ -27,6 +27,7 @@ #include #include #include +#include #define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ()) #define META_CURSOR_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_TRACKER, MetaCursorTracker))