mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	input: move function to config
This function is only about rc, so fits better in config.
This commit is contained in:
		
							parent
							
								
									241fcb0bde
								
							
						
					
					
						commit
						6def1319d1
					
				
					 5 changed files with 15 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -105,3 +105,17 @@ tablet_load_default_button_mappings(void)
 | 
			
		|||
	tablet_button_mapping_add(BTN_STYLUS, BTN_RIGHT);
 | 
			
		||||
	tablet_button_mapping_add(BTN_STYLUS2, BTN_MIDDLE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint32_t
 | 
			
		||||
tablet_get_mapped_button(uint32_t src_button)
 | 
			
		||||
{
 | 
			
		||||
	struct button_map_entry *map_entry;
 | 
			
		||||
	for (size_t i = 0; i < rc.tablet.button_map_count; i++) {
 | 
			
		||||
		map_entry = &rc.tablet.button_map[i];
 | 
			
		||||
		if (map_entry->from == src_button) {
 | 
			
		||||
			return map_entry->to;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	wlr_log(WLR_DEBUG, "no button map target for 0x%x", src_button);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue