mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Honour -c <file> on --reconfigure
This commit is contained in:
		
							parent
							
								
									698c7ace07
								
							
						
					
					
						commit
						dfb6664906
					
				
					 3 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -47,7 +47,9 @@ struct window_switcher_field {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct rcxml {
 | 
					struct rcxml {
 | 
				
			||||||
 | 
						/* from command line */
 | 
				
			||||||
	char *config_dir;
 | 
						char *config_dir;
 | 
				
			||||||
 | 
						char *config_file;
 | 
				
			||||||
	bool merge_config;
 | 
						bool merge_config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* core */
 | 
						/* core */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,7 +87,6 @@ main(int argc, char *argv[])
 | 
				
			||||||
	textdomain(GETTEXT_PACKAGE);
 | 
						textdomain(GETTEXT_PACKAGE);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	char *startup_cmd = NULL;
 | 
						char *startup_cmd = NULL;
 | 
				
			||||||
	char *config_file = NULL;
 | 
					 | 
				
			||||||
	enum wlr_log_importance verbosity = WLR_ERROR;
 | 
						enum wlr_log_importance verbosity = WLR_ERROR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int c;
 | 
						int c;
 | 
				
			||||||
| 
						 | 
					@ -99,7 +98,7 @@ main(int argc, char *argv[])
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		switch (c) {
 | 
							switch (c) {
 | 
				
			||||||
		case 'c':
 | 
							case 'c':
 | 
				
			||||||
			config_file = optarg;
 | 
								rc.config_file = optarg;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 'C':
 | 
							case 'C':
 | 
				
			||||||
			rc.config_dir = optarg;
 | 
								rc.config_dir = optarg;
 | 
				
			||||||
| 
						 | 
					@ -139,7 +138,7 @@ main(int argc, char *argv[])
 | 
				
			||||||
	die_on_detecting_suid();
 | 
						die_on_detecting_suid();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	session_environment_init();
 | 
						session_environment_init();
 | 
				
			||||||
	rcxml_read(config_file);
 | 
						rcxml_read(rc.config_file);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Set environment variable LABWC_PID to the pid of the compositor
 | 
						 * Set environment variable LABWC_PID to the pid of the compositor
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,7 @@ static void
 | 
				
			||||||
reload_config_and_theme(void)
 | 
					reload_config_and_theme(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	rcxml_finish();
 | 
						rcxml_finish();
 | 
				
			||||||
	rcxml_read(NULL);
 | 
						rcxml_read(rc.config_file);
 | 
				
			||||||
	theme_finish(g_server->theme);
 | 
						theme_finish(g_server->theme);
 | 
				
			||||||
	theme_init(g_server->theme, rc.theme_name);
 | 
						theme_init(g_server->theme, rc.theme_name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue