Honour -c <file> on --reconfigure

This commit is contained in:
Johan Malm 2024-01-18 19:45:49 +00:00 committed by Johan Malm
parent 698c7ace07
commit dfb6664906
3 changed files with 5 additions and 4 deletions

View file

@ -47,7 +47,9 @@ struct window_switcher_field {
};
struct rcxml {
/* from command line */
char *config_dir;
char *config_file;
bool merge_config;
/* core */

View file

@ -87,7 +87,6 @@ main(int argc, char *argv[])
textdomain(GETTEXT_PACKAGE);
#endif
char *startup_cmd = NULL;
char *config_file = NULL;
enum wlr_log_importance verbosity = WLR_ERROR;
int c;
@ -99,7 +98,7 @@ main(int argc, char *argv[])
}
switch (c) {
case 'c':
config_file = optarg;
rc.config_file = optarg;
break;
case 'C':
rc.config_dir = optarg;
@ -139,7 +138,7 @@ main(int argc, char *argv[])
die_on_detecting_suid();
session_environment_init();
rcxml_read(config_file);
rcxml_read(rc.config_file);
/*
* Set environment variable LABWC_PID to the pid of the compositor

View file

@ -47,7 +47,7 @@ static void
reload_config_and_theme(void)
{
rcxml_finish();
rcxml_read(NULL);
rcxml_read(rc.config_file);
theme_finish(g_server->theme);
theme_init(g_server->theme, rc.theme_name);