diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-08-04 01:12:41 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-06 11:32:26 +0900 |
commit | f59b665792fb664d00c3acd91e30977a05dc09f3 (patch) | |
tree | bae2dfa4ff31f7c6e5ef220cd8105fe75b85d2f8 | |
parent | swaymsg: return 2 for sway errors (diff) | |
download | sway-f59b665792fb664d00c3acd91e30977a05dc09f3.tar.gz sway-f59b665792fb664d00c3acd91e30977a05dc09f3.tar.zst sway-f59b665792fb664d00c3acd91e30977a05dc09f3.zip |
cmd_mode: make modes case sensitive
This mirrors a change in i3 4.17 that makes binding modes case
sensitive
-rw-r--r-- | sway/commands/mode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands/mode.c b/sway/commands/mode.c index e5ddec4a..9ddb0089 100644 --- a/sway/commands/mode.c +++ b/sway/commands/mode.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <stdbool.h> | 2 | #include <stdbool.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <strings.h> | ||
5 | #include "sway/commands.h" | 4 | #include "sway/commands.h" |
6 | #include "sway/config.h" | 5 | #include "sway/config.h" |
7 | #include "sway/ipc-server.h" | 6 | #include "sway/ipc-server.h" |
@@ -44,7 +43,7 @@ struct cmd_results *cmd_mode(int argc, char **argv) { | |||
44 | // Find mode | 43 | // Find mode |
45 | for (int i = 0; i < config->modes->length; ++i) { | 44 | for (int i = 0; i < config->modes->length; ++i) { |
46 | struct sway_mode *test = config->modes->items[i]; | 45 | struct sway_mode *test = config->modes->items[i]; |
47 | if (strcasecmp(test->name, mode_name) == 0) { | 46 | if (strcmp(test->name, mode_name) == 0) { |
48 | mode = test; | 47 | mode = test; |
49 | break; | 48 | break; |
50 | } | 49 | } |