From 17ff13fc84fd74ddcee68a302af156d7bf81ed85 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Tue, 31 Dec 2019 18:31:45 +0100 Subject: Replace unprintable characters in input device id --- sway/input/input-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = '_'; } } -- cgit v1.2.3