mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	seat_cmd_attach: defer while reading
Since the seats and inputs are not yet available while the config is being read, defer seat attachment requests
This commit is contained in:
		
							parent
							
								
									0952c9f91d
								
							
						
					
					
						commit
						1bd7400c4d
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -12,6 +12,9 @@ struct cmd_results *seat_cmd_attach(int argc, char **argv) {
 | 
				
			||||||
	if (!config->handler_context.seat_config) {
 | 
						if (!config->handler_context.seat_config) {
 | 
				
			||||||
		return cmd_results_new(CMD_FAILURE, "No seat defined");
 | 
							return cmd_results_new(CMD_FAILURE, "No seat defined");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if (config->reading) {
 | 
				
			||||||
 | 
							return cmd_results_new(CMD_DEFER, NULL);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct seat_attachment_config *attachment = seat_attachment_config_new();
 | 
						struct seat_attachment_config *attachment = seat_attachment_config_new();
 | 
				
			||||||
	if (!attachment) {
 | 
						if (!attachment) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue