aboutsummaryrefslogtreecommitdiff
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/input-manager.c')
-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 = '_';
}
}