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.
This commit is contained in:
parent
6d0d1deda2
commit
cc31ed77bd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user