mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	sway_binding_cmp_keys: Differentiate between modifier keys.
Compare modifiers as well as keys when number of modifiers+keys are the same (so that e.g. mod1+x != mod4+x).
This commit is contained in:
		
							parent
							
								
									8ad8ceeeb9
								
							
						
					
					
						commit
						a6c9f40b9a
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -401,6 +401,11 @@ int sway_binding_cmp_keys(const void *a, const void *b) {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	// Otherwise compare keys
 | 
			
		||||
	if (binda->modifiers > bindb->modifiers) {
 | 
			
		||||
		return 1;
 | 
			
		||||
	} else if (binda->modifiers < bindb->modifiers) {
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
	for (int i = 0; i < binda->keys->length; i++) {
 | 
			
		||||
		xkb_keysym_t *ka = binda->keys->items[i],
 | 
			
		||||
				*kb = bindb->keys->items[i];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue