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
This commit is contained in:
Giovanni Campagna 2013-09-11 10:22:58 +02:00
parent 004ee2d3b5
commit 4494888b82
3 changed files with 10 additions and 10 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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