aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-16 13:00:31 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-16 13:00:31 -0500
commit24e240642984a3b7ee2fba0828eb4375e901aafc (patch)
tree3077cc06c8f1d7d77dffc56026d8f551a0aee139 /sway/input/input-manager.c
parentexpect exactly one xkb arg (diff)
downloadsway-24e240642984a3b7ee2fba0828eb4375e901aafc.tar.gz
sway-24e240642984a3b7ee2fba0828eb4375e901aafc.tar.zst
sway-24e240642984a3b7ee2fba0828eb4375e901aafc.zip
strip whitespace for device id
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 1950b6d9..e4558366 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -9,6 +9,7 @@
9#include "sway/input/input-manager.h" 9#include "sway/input/input-manager.h"
10#include "sway/input/seat.h" 10#include "sway/input/seat.h"
11#include "sway/server.h" 11#include "sway/server.h"
12#include "stringop.h"
12#include "list.h" 13#include "list.h"
13#include "log.h" 14#include "log.h"
14 15
@@ -36,6 +37,7 @@ static char *get_device_identifier(struct wlr_input_device *device) {
36 int vendor = device->vendor; 37 int vendor = device->vendor;
37 int product = device->product; 38 int product = device->product;
38 char *name = strdup(device->name); 39 char *name = strdup(device->name);
40 name = strip_whitespace(name);
39 41
40 char *p = name; 42 char *p = name;
41 for (; *p; ++p) { 43 for (; *p; ++p) {