[mutter/wayland] Add an option to run as a wayland compositor



commit 4494888b8227687d0492a74df1a8acb708003011
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 11 10:22:58 2013 +0200

    Add an option to run as a wayland compositor
    
    Move the option from the mutter binary to libmutter, and
    rename from --nested to --wayland.
    This allows gnome-shell to drop the set_is_wayland_compositor()
    call.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707897

 src/core/main.c               |    9 +++++++++
 src/core/mutter.c             |    9 ---------
 src/mutter-wayland.desktop.in |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 5f1f4da..8ff90ec 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 439fcca..3216726 100644
--- a/src/core/mutter.c
+++ b/src/core/mutter.c
@@ -46,16 +46,9 @@ 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,
     N_("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 42c517a..ebf1447 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]