mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	seat: improve debug logging when configuring input devices
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				labwc.github.io / notify (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	labwc.github.io / notify (push) Has been cancelled
				
			I needed to debug an input configuration issue and found the debug output not-super-helpful, so I made some improvements: - Print the name and "sysname" (e.g. event11) of the device being configured. Note that the name alone isn't enough since there can be multiple identically-named devices. - Print the config category matched for each device. - Print the config values (if any) being applied. For enums, only the numeric value is printed since I'm lazy. - Don't print "pointer acceleration configured" if neither a pointer speed nor acceleration profile is configured (it's confusing).
This commit is contained in:
		
							parent
							
								
									80b28f16c7
								
							
						
					
					
						commit
						c8943ca242
					
				
					 3 changed files with 59 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -51,6 +51,25 @@ get_device_type(const char *s)
 | 
			
		|||
	return LAB_LIBINPUT_DEVICE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char *
 | 
			
		||||
libinput_device_type_name(enum lab_libinput_device_type type)
 | 
			
		||||
{
 | 
			
		||||
	switch (type) {
 | 
			
		||||
	case LAB_LIBINPUT_DEVICE_NONE:
 | 
			
		||||
		break;
 | 
			
		||||
	case LAB_LIBINPUT_DEVICE_DEFAULT:
 | 
			
		||||
		return "default";
 | 
			
		||||
	case LAB_LIBINPUT_DEVICE_TOUCH:
 | 
			
		||||
		return "touch";
 | 
			
		||||
	case LAB_LIBINPUT_DEVICE_TOUCHPAD:
 | 
			
		||||
		return "touchpad";
 | 
			
		||||
	case LAB_LIBINPUT_DEVICE_NON_TOUCH:
 | 
			
		||||
		return "non-touch";
 | 
			
		||||
	}
 | 
			
		||||
	/* none/invalid */
 | 
			
		||||
	return "(none)";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct libinput_category *
 | 
			
		||||
libinput_category_create(void)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue