[clutter] Read the config file when creating the global shared state
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Read the config file when creating the global shared state
- Date: Fri, 11 Dec 2015 15:56:02 +0000 (UTC)
commit cc31ed77bda37d2739fdc3137cb15eda51605c7b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Dec 11 15:39:54 2015 +0000
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 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index e9cf9b0..d1cf4f0 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]