summaryrefslogtreecommitdiffstats
path: root/sway/commands/focus_wrapping.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/focus_wrapping.c')
-rw-r--r--sway/commands/focus_wrapping.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sway/commands/focus_wrapping.c b/sway/commands/focus_wrapping.c
index 0a9e0bf2..562ee4f9 100644
--- a/sway/commands/focus_wrapping.c
+++ b/sway/commands/focus_wrapping.c
@@ -1,6 +1,7 @@
1#include <strings.h> 1#include <strings.h>
2#include "sway/commands.h" 2#include "sway/commands.h"
3#include "sway/config.h" 3#include "sway/config.h"
4#include "util.h"
4 5
5struct cmd_results *cmd_focus_wrapping(int argc, char **argv) { 6struct cmd_results *cmd_focus_wrapping(int argc, char **argv) {
6 struct cmd_results *error = NULL; 7 struct cmd_results *error = NULL;
@@ -8,15 +9,12 @@ struct cmd_results *cmd_focus_wrapping(int argc, char **argv) {
8 return error; 9 return error;
9 } 10 }
10 11
11 if (strcasecmp(argv[0], "no") == 0) { 12 if (strcasecmp(argv[0], "force") == 0) {
12 config->focus_wrapping = WRAP_NO;
13 } else if (strcasecmp(argv[0], "yes") == 0) {
14 config->focus_wrapping = WRAP_YES;
15 } else if (strcasecmp(argv[0], "force") == 0) {
16 config->focus_wrapping = WRAP_FORCE; 13 config->focus_wrapping = WRAP_FORCE;
14 } else if (parse_boolean(argv[0], config->focus_wrapping == WRAP_YES)) {
15 config->focus_wrapping = WRAP_YES;
17 } else { 16 } else {
18 return cmd_results_new(CMD_INVALID, "focus_wrapping", 17 config->focus_wrapping = WRAP_NO;
19 "Expected 'focus_wrapping yes|no|force'");
20 } 18 }
21 19
22 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 20 return cmd_results_new(CMD_SUCCESS, NULL, NULL);