From a55472c6d882d806e9d6fc0a78a7f7d8f888492e Mon Sep 17 00:00:00 2001
From: Thomas Jost <schnouki@schnouki.net>
Date: Sat, 25 Jun 2022 11:10:11 +0200
Subject: Strip quotes in bindsym --input-device=...

If the input device is quoted, which is common when using variables in the
config file, those quotes must be ignored here, or the input device will be
ignored.

Fixes #7029.
---
 sway/commands/bind.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'sway')

diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 26c99e63..c0b383db 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -372,6 +372,7 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
 					strlen("--input-device=")) == 0) {
 			free(binding->input);
 			binding->input = strdup(argv[0] + strlen("--input-device="));
+			strip_quotes(binding->input);
 		} else if (strcmp("--no-warn", argv[0]) == 0) {
 			warn = false;
 		} else if (strcmp("--no-repeat", argv[0]) == 0) {
-- 
cgit v1.2.3