diff --git a/configure.ac b/configure.ac index d7ab68c88..329025ad9 100644 --- a/configure.ac +++ b/configure.ac @@ -212,9 +212,6 @@ fi MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcursor" -# We always build with wayland enabled -AC_DEFINE(HAVE_WAYLAND, , [Building with Wayland support]) - AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no]) AS_IF([test "x$WAYLAND_SCANNER" = "xno"], AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])) diff --git a/src/Makefile.am b/src/Makefile.am index 89d252107..ae8f7c130 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -188,12 +188,7 @@ libmutter_wayland_la_SOURCES = \ ui/theme.c \ meta/theme.h \ ui/theme-private.h \ - ui/ui.c - -nodist_libmutter_wayland_la_SOURCES = \ - $(mutter_built_sources) - -libmutter_wayland_la_SOURCES += \ + ui/ui.c \ wayland/meta-wayland.c \ wayland/meta-wayland-private.h \ wayland/meta-xwayland-private.h \ @@ -215,6 +210,9 @@ libmutter_wayland_la_SOURCES += \ wayland/meta-weston-launch.c \ wayland/meta-weston-launch.h +nodist_libmutter_wayland_la_SOURCES = \ + $(mutter_built_sources) + libmutter_wayland_la_LDFLAGS = -no-undefined libmutter_wayland_la_LIBADD = $(MUTTER_LIBS) diff --git a/src/core/display.c b/src/core/display.c index 8854e7944..34c66eff4 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -2055,18 +2055,16 @@ meta_display_handle_event (MetaDisplay *display, { MetaWindow *window; gboolean bypass_clutter = FALSE, bypass_wayland = FALSE; + MetaWaylandCompositor *compositor = NULL; /* XXX -- we need to fill this in properly at some point... */ gboolean frame_was_receiver = FALSE; -#ifdef HAVE_WAYLAND - MetaWaylandCompositor *compositor = NULL; if (meta_is_wayland_compositor ()) { compositor = meta_wayland_compositor_get_default (); meta_wayland_compositor_update (compositor, event); } -#endif /* HAVE_WAYLAND */ window = get_window_for_event (display, event); @@ -2314,13 +2312,11 @@ meta_display_handle_event (MetaDisplay *display, if (display->grab_op == META_GRAB_OP_COMPOSITOR) bypass_wayland = TRUE; -#ifdef HAVE_WAYLAND if (compositor && !bypass_wayland) { if (meta_wayland_compositor_handle_event (compositor, event)) bypass_clutter = TRUE; } -#endif /* HAVE_WAYLAND */ return bypass_clutter; } diff --git a/src/core/keybindings.c b/src/core/keybindings.c index f0dca9c25..e46d046d1 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -41,6 +41,7 @@ #include "screen-private.h" #include #include "util-private.h" +#include "meta-wayland-private.h" #include #include @@ -51,10 +52,6 @@ #include #endif -#ifdef HAVE_WAYLAND -#include "meta-wayland-private.h" -#endif - #define SCHEMA_COMMON_KEYBINDINGS "org.gnome.desktop.wm.keybindings" #define SCHEMA_MUTTER_KEYBINDINGS "org.gnome.mutter.keybindings" #define SCHEMA_MUTTER_WAYLAND_KEYBINDINGS "org.gnome.mutter.wayland.keybindings" @@ -4079,7 +4076,6 @@ handle_set_spew_mark (MetaDisplay *display, meta_verbose ("-- MARK MARK MARK MARK --\n"); } -#ifdef HAVE_WAYLAND static void handle_switch_vt (MetaDisplay *display, MetaScreen *screen, @@ -4098,7 +4094,6 @@ handle_switch_vt (MetaDisplay *display, g_error_free (error); } } -#endif /** * meta_keybindings_set_custom_handler: @@ -4403,7 +4398,6 @@ init_builtin_key_bindings (MetaDisplay *display) META_KEYBINDING_ACTION_SET_SPEW_MARK, handle_set_spew_mark, 0); -#ifdef HAVE_WAYLAND if (meta_is_wayland_compositor ()) { add_builtin_keybinding (display, @@ -4455,7 +4449,6 @@ init_builtin_key_bindings (MetaDisplay *display) META_KEYBINDING_ACTION_NONE, handle_switch_vt, 7); } -#endif #undef REVERSES_AND_REVERSED diff --git a/src/core/meta-cursor-tracker.c b/src/core/meta-cursor-tracker.c index 96d2b0528..32e860872 100644 --- a/src/core/meta-cursor-tracker.c +++ b/src/core/meta-cursor-tracker.c @@ -615,11 +615,9 @@ 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/core/monitor-private.h b/src/core/monitor-private.h index 2b0ef422c..842ab97af 100644 --- a/src/core/monitor-private.h +++ b/src/core/monitor-private.h @@ -42,9 +42,7 @@ #include #include "stack-tracker.h" #include "ui.h" -#ifdef HAVE_WAYLAND #include -#endif #include "meta-xrandr-shared.h" #include "meta-dbus-xrandr.h" @@ -54,19 +52,6 @@ typedef struct _MetaMonitorManager MetaMonitorManager; typedef struct _MetaMonitorConfigClass MetaMonitorConfigClass; typedef struct _MetaMonitorConfig MetaMonitorConfig; -#ifndef HAVE_WAYLAND -enum wl_output_transform { - WL_OUTPUT_TRANSFORM_NORMAL, - WL_OUTPUT_TRANSFORM_90, - WL_OUTPUT_TRANSFORM_180, - WL_OUTPUT_TRANSFORM_270, - WL_OUTPUT_TRANSFORM_FLIPPED, - WL_OUTPUT_TRANSFORM_FLIPPED_90, - WL_OUTPUT_TRANSFORM_FLIPPED_180, - WL_OUTPUT_TRANSFORM_FLIPPED_270 -}; -#endif - typedef struct _MetaOutput MetaOutput; typedef struct _MetaCRTC MetaCRTC; typedef struct _MetaMonitorMode MetaMonitorMode; diff --git a/src/core/window-private.h b/src/core/window-private.h index bcac505dc..92c7bf635 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -79,9 +79,7 @@ struct _MetaWindow const MetaMonitorInfo *monitor; MetaWorkspace *workspace; MetaWindowClientType client_type; -#ifdef HAVE_WAYLAND MetaWaylandSurface *surface; -#endif Window xwindow; /* may be NULL! not all windows get decorated */ MetaFrame *frame;