mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	config: remove duplication in libinput-category parsing
Related-to: #1382
This commit is contained in:
		
							parent
							
								
									aff673bee4
								
							
						
					
					
						commit
						5337eda242
					
				
					 3 changed files with 21 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -26,7 +26,10 @@ libinput_category_init(struct libinput_category *l)
 | 
			
		|||
enum device_type
 | 
			
		||||
get_device_type(const char *s)
 | 
			
		||||
{
 | 
			
		||||
	if (!s) {
 | 
			
		||||
	if (!s || !*s) {
 | 
			
		||||
		return LAB_LIBINPUT_DEVICE_NONE;
 | 
			
		||||
	}
 | 
			
		||||
	if (!strcasecmp(s, "default")) {
 | 
			
		||||
		return DEFAULT_DEVICE;
 | 
			
		||||
	}
 | 
			
		||||
	if (!strcasecmp(s, "touch")) {
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +41,7 @@ get_device_type(const char *s)
 | 
			
		|||
	if (!strcasecmp(s, "non-touch")) {
 | 
			
		||||
		return NON_TOUCH_DEVICE;
 | 
			
		||||
	}
 | 
			
		||||
	return DEFAULT_DEVICE;
 | 
			
		||||
	return LAB_LIBINPUT_DEVICE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct libinput_category *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue