diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-12-11 15:39:54 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-12-11 15:53:24 +0000 |
commit | cc31ed77bda37d2739fdc3137cb15eda51605c7b (patch) | |
tree | d49bd1eff87b1b9b55cfd6780e00282a95e61d69 | |
parent | 6d0d1deda2c75535f162253ae8b6787a2c885f71 (diff) | |
download | clutter-cc31ed77bda37d2739fdc3137cb15eda51605c7b.tar.gz |
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.
-rw-r--r-- | clutter/clutter-main.c | 12 |
1 files 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; |