mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	cmd_bind: pass the seat to execute_command
`seat_execute_command` was incorrectly setting `config->handler_context.seat` before calling `execute_command`. Since `execute_command` was being called with a `NULL` seat argument, `execute_command` was setting `config->handler_context.seat` to the default seat. This resulted in all bindings being executed on the default seat and causing undesired behavior for devices on other seats.
This commit is contained in:
		
							parent
							
								
									da8f24de1d
								
							
						
					
					
						commit
						fdc262d402
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -312,8 +312,7 @@ struct cmd_results *cmd_bindcode(int argc, char **argv) {
 | 
				
			||||||
void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) {
 | 
					void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) {
 | 
				
			||||||
	wlr_log(WLR_DEBUG, "running command for binding: %s", binding->command);
 | 
						wlr_log(WLR_DEBUG, "running command for binding: %s", binding->command);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	config->handler_context.seat = seat;
 | 
						list_t *res_list = execute_command(binding->command, seat, NULL);
 | 
				
			||||||
	list_t *res_list = execute_command(binding->command, NULL, NULL);
 | 
					 | 
				
			||||||
	bool success = true;
 | 
						bool success = true;
 | 
				
			||||||
	for (int i = 0; i < res_list->length; ++i) {
 | 
						for (int i = 0; i < res_list->length; ++i) {
 | 
				
			||||||
		struct cmd_results *results = res_list->items[i];
 | 
							struct cmd_results *results = res_list->items[i];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue