mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Replace unprintable characters in input device id
(cherry picked from commit 17ff13fc84)
			
			
This commit is contained in:
		
							parent
							
								
									cdff693e2e
								
							
						
					
					
						commit
						c199c8d6ea
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -70,7 +70,8 @@ char *input_device_get_identifier(struct wlr_input_device *device) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	char *p = name;
 | 
						char *p = name;
 | 
				
			||||||
	for (; *p; ++p) {
 | 
						for (; *p; ++p) {
 | 
				
			||||||
		if (*p == ' ') {
 | 
							// There are in fact input devices with unprintable characters in its name
 | 
				
			||||||
 | 
							if (*p == ' ' || !isprint(*p)) {
 | 
				
			||||||
			*p = '_';
 | 
								*p = '_';
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue