mutter: Only allow one plugin to be loaded
https://bugzilla.gnome.org/show_bug.cgi?id=676855
This commit is contained in:
parent
7c1b734053
commit
80a70a4ad1
@ -45,7 +45,7 @@ print_version (const gchar *option_name,
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *mutter_plugins;
|
static gchar *plugin;
|
||||||
|
|
||||||
GOptionEntry mutter_options[] = {
|
GOptionEntry mutter_options[] = {
|
||||||
{
|
{
|
||||||
@ -55,10 +55,10 @@ GOptionEntry mutter_options[] = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mutter-plugins", 0, 0, G_OPTION_ARG_STRING,
|
"mutter-plugin", 0, 0, G_OPTION_ARG_STRING,
|
||||||
&mutter_plugins,
|
&plugin,
|
||||||
N_("Comma-separated list of compositor plugins"),
|
N_("Mutter plugin to use"),
|
||||||
"PLUGINS"
|
"PLUGIN",
|
||||||
},
|
},
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
@ -79,19 +79,11 @@ main (int argc, char **argv)
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mutter_plugins)
|
if (plugin)
|
||||||
{
|
{
|
||||||
MetaPluginManager *mgr;
|
MetaPluginManager *mgr;
|
||||||
char **plugins = g_strsplit (mutter_plugins, ",", -1);
|
|
||||||
char **plugin;
|
|
||||||
|
|
||||||
mgr = meta_plugin_manager_get_default ();
|
mgr = meta_plugin_manager_get_default ();
|
||||||
for (plugin = plugins; *plugin; plugin++)
|
meta_plugin_manager_load (mgr, plugin);
|
||||||
{
|
|
||||||
g_strstrip (*plugin);
|
|
||||||
meta_plugin_manager_load (mgr, *plugin);
|
|
||||||
}
|
|
||||||
g_strfreev (plugins);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_init ();
|
meta_init ();
|
||||||
|
Loading…
Reference in New Issue
Block a user