diff options
author | wb9688 <wb9688@users.noreply.github.com> | 2019-12-31 18:31:45 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-07-03 14:59:20 +0200 |
commit | 17ff13fc84fd74ddcee68a302af156d7bf81ed85 (patch) | |
tree | 35b8a4bb370895de60ce9721d999c079e6809ae1 | |
parent | b5a35c484f651e25b226c9661669c8a40439f09b (diff) |
Replace unprintable characters in input device id
-rw-r--r-- | sway/input/input-manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 69342c73..f04a8ce0 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -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 = '_'; } } |