aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Thomas Jost <schnouki@schnouki.net>2022-06-25 11:10:11 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2022-06-25 11:27:49 +0200
commita55472c6d882d806e9d6fc0a78a7f7d8f888492e (patch)
tree9a0a380095e31ddfd21a4f96d6abd935a2dae8a0
parentRename dpms output command to power (diff)
downloadsway-a55472c6d882d806e9d6fc0a78a7f7d8f888492e.tar.gz
sway-a55472c6d882d806e9d6fc0a78a7f7d8f888492e.tar.zst
sway-a55472c6d882d806e9d6fc0a78a7f7d8f888492e.zip
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.
-rw-r--r--sway/commands/bind.c1
1 files changed, 1 insertions, 0 deletions
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,
372 strlen("--input-device=")) == 0) { 372 strlen("--input-device=")) == 0) {
373 free(binding->input); 373 free(binding->input);
374 binding->input = strdup(argv[0] + strlen("--input-device=")); 374 binding->input = strdup(argv[0] + strlen("--input-device="));
375 strip_quotes(binding->input);
375 } else if (strcmp("--no-warn", argv[0]) == 0) { 376 } else if (strcmp("--no-warn", argv[0]) == 0) {
376 warn = false; 377 warn = false;
377 } else if (strcmp("--no-repeat", argv[0]) == 0) { 378 } else if (strcmp("--no-repeat", argv[0]) == 0) {