summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 06605c5e2..5a20cd6a7 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -98,6 +98,29 @@
#include "backends/native/meta-backend-native.h"
#endif
+static const GDebugKey meta_debug_keys[] = {
+ { "focus", META_DEBUG_FOCUS },
+ { "workarea", META_DEBUG_WORKAREA },
+ { "stack", META_DEBUG_STACK },
+ { "sm", META_DEBUG_SM },
+ { "events", META_DEBUG_EVENTS },
+ { "window-state", META_DEBUG_WINDOW_STATE },
+ { "window-ops", META_DEBUG_WINDOW_OPS },
+ { "geometry", META_DEBUG_GEOMETRY },
+ { "placement", META_DEBUG_PLACEMENT },
+ { "ping", META_DEBUG_PING },
+ { "keybindings", META_DEBUG_KEYBINDINGS },
+ { "sync", META_DEBUG_SYNC },
+ { "startup", META_DEBUG_STARTUP },
+ { "prefs", META_DEBUG_PREFS },
+ { "groups", META_DEBUG_GROUPS },
+ { "resizing", META_DEBUG_RESIZING },
+ { "shapes", META_DEBUG_SHAPES },
+ { "edge-resistance", META_DEBUG_EDGE_RESISTANCE },
+ { "dbus", META_DEBUG_DBUS },
+ { "input", META_DEBUG_INPUT },
+};
+
/*
* The exit code we'll return to our parent process when we eventually die.
*/
@@ -535,6 +558,7 @@ meta_init (void)
{
struct sigaction act;
sigset_t empty_mask;
+ const char *debug_env;
MetaCompositorType compositor_type;
GType backend_gtype;
@@ -559,8 +583,17 @@ meta_init (void)
if (g_getenv ("MUTTER_VERBOSE"))
meta_set_verbose (TRUE);
- if (g_getenv ("MUTTER_DEBUG"))
- meta_set_debugging (TRUE);
+
+ debug_env = g_getenv ("MUTTER_DEBUG");
+ if (debug_env)
+ {
+ MetaDebugTopic topics;
+
+ topics = g_parse_debug_string (debug_env,
+ meta_debug_keys,
+ G_N_ELEMENTS (meta_debug_keys));
+ meta_add_verbose_topic (topics);
+ }
if (_compositor_configuration_overridden)
{