mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	commands/exec_always: defer command on config validation
The exec_always command was executed twice, since it was not checking for the config->validating variable. Fix this by defering the command if the configuration is validating. Fixes #3072
This commit is contained in:
		
							parent
							
								
									e9c77970fa
								
							
						
					
					
						commit
						5fdffea99a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -15,7 +15,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct cmd_results *cmd_exec_always(int argc, char **argv) {
 | 
					struct cmd_results *cmd_exec_always(int argc, char **argv) {
 | 
				
			||||||
	struct cmd_results *error = NULL;
 | 
						struct cmd_results *error = NULL;
 | 
				
			||||||
	if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL);
 | 
						if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL);
 | 
				
			||||||
	if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) {
 | 
						if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) {
 | 
				
			||||||
		return error;
 | 
							return error;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue