From 9c90210ff122f1be16bc2a6e96cd1fad94c1d4bd Mon Sep 17 00:00:00 2001 From: Joe Konno Date: Mon, 26 Nov 2012 12:45:04 -0800 Subject: [PATCH 1/2] desktop-shell: Parse config file earlier The [shell] section of weston.ini was being parsed after calls to panel_create(). It seems sensible to parse the config file before those calls are made, which is what this patch does. Should scale a bit better, should configurable panel features be added to the desktop-shell. Signed-off-by: Joe Konno --- clients/desktop-shell.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 1cae789..83a98e0 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -1100,6 +1100,11 @@ int main(int argc, char *argv[]) return -1; } + config_file = config_file_path("weston.ini"); + ret = parse_config_file(config_file, + config_sections, ARRAY_LENGTH(config_sections), + &desktop); + display_set_user_data(desktop.display, &desktop); display_set_global_handler(desktop.display, global_handler); @@ -1119,10 +1124,6 @@ int main(int argc, char *argv[]) grab_surface_create(&desktop); - config_file = config_file_path("weston.ini"); - ret = parse_config_file(config_file, - config_sections, ARRAY_LENGTH(config_sections), - &desktop); free(config_file); if (ret < 0) add_default_launcher(&desktop); -- 1.7.11.7