From cc31ed77bda37d2739fdc3137cb15eda51605c7b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 11 Dec 2015 15:39:54 +0000 Subject: [PATCH] Read the config file when creating the global shared state The configuration file should set up the global state before we initialize it; instead of relying on implicit ordering, explicitly read the configuration file once, when creating the global shared context data structure. --- clutter/clutter-main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index e9cf9b00b..d1cf4f0ca 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -1229,6 +1229,12 @@ clutter_context_get_default_unlocked (void) { ClutterMainContext *ctx; + /* Read the configuration file, if any, before we set up the + * whole thing, so that we can override things like the backend + * and the driver + */ + clutter_config_read (); + ClutterCntx = ctx = g_new0 (ClutterMainContext, 1); ctx->is_initialized = FALSE; @@ -1452,12 +1458,6 @@ pre_parse_hook (GOptionContext *context, g_warning ("Locale not supported by C library.\n" "Using the fallback 'C' locale."); - /* read the configuration file, if it exists; the configuration file - * determines the initial state of the settings, so that command line - * arguments can override them. - */ - clutter_config_read (); - clutter_context = _clutter_context_get_default (); backend = clutter_context->backend;