mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	keyboard: cancel keybind_repeat on reconfigure
Currently we may end up in an endless loop of Reconfigure requests if the Reconfigure action was called by a keybind. If the reconfigure takes too long (which may happen on slow systems with libsfdo full debug logging for example) the reconfigure might be triggered again and again. To prevent that, simply cancel all keybind_repeat timers on reconfigure.
This commit is contained in:
		
							parent
							
								
									7a6ecca804
								
							
						
					
					
						commit
						663f913ee4
					
				
					 3 changed files with 20 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -619,6 +619,19 @@ keyboard_cancel_keybind_repeat(struct keyboard *keyboard)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
keyboard_cancel_all_keybind_repeats(struct seat *seat)
 | 
			
		||||
{
 | 
			
		||||
	struct input *input;
 | 
			
		||||
	struct keyboard *kb;
 | 
			
		||||
	wl_list_for_each(input, &seat->inputs, link) {
 | 
			
		||||
		if (input->wlr_input_device->type == WLR_INPUT_DEVICE_KEYBOARD) {
 | 
			
		||||
			kb = wl_container_of(input, kb, base);
 | 
			
		||||
			keyboard_cancel_keybind_repeat(kb);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
keyboard_key_notify(struct wl_listener *listener, void *data)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue