aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorwb9688 <wb9688@users.noreply.github.com>2019-12-31 18:31:45 +0100
committerSimon Ser <contact@emersion.fr>2020-07-03 14:59:20 +0200
commit17ff13fc84fd74ddcee68a302af156d7bf81ed85 (patch)
tree35b8a4bb370895de60ce9721d999c079e6809ae1 /sway/input
parentb5a35c484f651e25b226c9661669c8a40439f09b (diff)
Replace unprintable characters in input device id
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/input-manager.c3
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 = '_';
}
}