main: Parse MUTTER_DEBUG as debug string

This makes it possible to run e.g.

    env MUTTER_DEBUG=input:geometry gnome-shell

which will enable the 'META_DEBUG_INPUT' and 'META_DEBUG_GEOMETRY'
topics.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1465
This commit is contained in:
Jonas Ådahl
2020-10-01 15:05:17 +02:00
committed by Georges Basile Stavracas Neto
parent 24c374ffb2
commit b1ffd14d62
2 changed files with 38 additions and 5 deletions

View File

@@ -116,9 +116,6 @@ meta_set_verbose (gboolean setting)
#ifndef WITH_VERBOSE_MODE
if (setting)
meta_fatal (_("Mutter was compiled without support for verbose mode\n"));
#else
if (setting)
ensure_logfile ();
#endif
if (setting)
@@ -139,6 +136,9 @@ meta_add_verbose_topic (MetaDebugTopic topic)
{
if (verbose_topics == META_DEBUG_VERBOSE)
return;
ensure_logfile ();
if (topic == META_DEBUG_VERBOSE)
verbose_topics = META_DEBUG_VERBOSE;
else