mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c: Add a --g-fatal-warnings switch for abort()-ing on warnings and criticals.
This commit is contained in:
parent
e4b9a507e3
commit
dae4375d08
@ -1,3 +1,8 @@
|
|||||||
|
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-main.c: Add a --g-fatal-warnings switch
|
||||||
|
for abort()-ing on warnings and criticals.
|
||||||
|
|
||||||
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
|
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* configure.ac: Enable debug messages also when
|
* configure.ac: Enable debug messages also when
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
static gboolean clutter_is_initialized = FALSE;
|
static gboolean clutter_is_initialized = FALSE;
|
||||||
static gboolean clutter_show_fps = FALSE;
|
static gboolean clutter_show_fps = FALSE;
|
||||||
|
static gboolean clutter_fatal_warnings = FALSE;
|
||||||
static gchar *clutter_display_name = NULL;
|
static gchar *clutter_display_name = NULL;
|
||||||
static int clutter_screen = 0;
|
static int clutter_screen = 0;
|
||||||
|
|
||||||
@ -561,6 +562,8 @@ static GOptionEntry clutter_args[] = {
|
|||||||
"X screen to use", "SCREEN" },
|
"X screen to use", "SCREEN" },
|
||||||
{ "clutter-show-fps", 0, 0, G_OPTION_ARG_NONE, &clutter_show_fps,
|
{ "clutter-show-fps", 0, 0, G_OPTION_ARG_NONE, &clutter_show_fps,
|
||||||
"Show frames per second", NULL },
|
"Show frames per second", NULL },
|
||||||
|
{ "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &clutter_fatal_warnings,
|
||||||
|
"Make all warnings fatal", NULL },
|
||||||
#ifdef CLUTTER_ENABLE_DEBUG
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
{ "clutter-debug", 0, 0, G_OPTION_ARG_CALLBACK, clutter_arg_debug_cb,
|
{ "clutter-debug", 0, 0, G_OPTION_ARG_CALLBACK, clutter_arg_debug_cb,
|
||||||
"Clutter debugging flags to set", "FLAGS" },
|
"Clutter debugging flags to set", "FLAGS" },
|
||||||
@ -624,6 +627,18 @@ post_parse_hook (GOptionContext *context,
|
|||||||
{
|
{
|
||||||
ClutterMainContext *clutter_context;
|
ClutterMainContext *clutter_context;
|
||||||
|
|
||||||
|
if (clutter_is_initialized)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (clutter_fatal_warnings)
|
||||||
|
{
|
||||||
|
GLogLevelFlags fatal_mask;
|
||||||
|
|
||||||
|
fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
|
||||||
|
fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
|
||||||
|
g_log_set_always_fatal (fatal_mask);
|
||||||
|
}
|
||||||
|
|
||||||
clutter_context = clutter_context_get_default ();
|
clutter_context = clutter_context_get_default ();
|
||||||
clutter_context->main_loops = NULL;
|
clutter_context->main_loops = NULL;
|
||||||
clutter_context->main_loop_level = 0;
|
clutter_context->main_loop_level = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user