mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Replace unprintable characters in input device id
This commit is contained in:
parent
b5a35c484f
commit
17ff13fc84
|
@ -70,7 +70,8 @@ char *input_device_get_identifier(struct wlr_input_device *device) {
|
|||
|
||||
char *p = name;
|
||||
for (; *p; ++p) {
|
||||
if (*p == ' ') {
|
||||
// There are in fact input devices with unprintable characters in its name
|
||||
if (*p == ' ' || !isprint(*p)) {
|
||||
*p = '_';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue