diff --git a/src/core/main.c b/src/core/main.c index 5f1f4daeb..8ff90ec94 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -191,6 +191,7 @@ static gchar *opt_client_id; static gboolean opt_replace_wm; static gboolean opt_disable_sm; static gboolean opt_sync; +static gboolean opt_wayland; static GOptionEntry meta_options[] = { { @@ -228,6 +229,12 @@ static GOptionEntry meta_options[] = { N_("Make X calls synchronous"), NULL }, + { + "wayland", 0, 0, G_OPTION_ARG_NONE, + &opt_wayland, + N_("Run as a wayland compositor"), + NULL + }, {NULL} }; @@ -393,6 +400,8 @@ meta_init (void) if (g_getenv ("MUTTER_DEBUG")) meta_set_debugging (TRUE); + meta_set_is_wayland_compositor (opt_wayland); + if (g_get_home_dir ()) if (chdir (g_get_home_dir ()) < 0) meta_warning ("Could not change to home directory %s.\n", diff --git a/src/core/mutter.c b/src/core/mutter.c index 439fccad3..3216726cf 100644 --- a/src/core/mutter.c +++ b/src/core/mutter.c @@ -46,15 +46,8 @@ print_version (const gchar *option_name, } static gchar *plugin = "default"; -static gboolean opt_nested = FALSE; GOptionEntry mutter_options[] = { - { - "nested", 0, 0, G_OPTION_ARG_NONE, - &opt_nested, - N_("Run nested as an application for testing"), - NULL, - }, { "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, print_version, @@ -84,8 +77,6 @@ main (int argc, char **argv) exit (1); } - meta_set_is_wayland_compositor (opt_nested); - if (plugin) meta_plugin_manager_load (plugin); diff --git a/src/mutter-wayland.desktop.in b/src/mutter-wayland.desktop.in index 42c517a70..ebf144741 100644 --- a/src/mutter-wayland.desktop.in +++ b/src/mutter-wayland.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Type=Application _Name=Mutter (wayland compositor) -Exec=mutter-launch -- mutter --nested +Exec=mutter-launch -- mutter --wayland NoDisplay=true # name of loadable control center module X-GNOME-WMSettingsModule=metacity