diff options
Diffstat (limited to 'sway/commands/focus_follows_mouse.c')
-rw-r--r-- | sway/commands/focus_follows_mouse.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/commands/focus_follows_mouse.c b/sway/commands/focus_follows_mouse.c index 0b0e334c..d0d2cb8a 100644 --- a/sway/commands/focus_follows_mouse.c +++ b/sway/commands/focus_follows_mouse.c | |||
@@ -7,8 +7,15 @@ struct cmd_results *cmd_focus_follows_mouse(int argc, char **argv) { | |||
7 | struct cmd_results *error = NULL; | 7 | struct cmd_results *error = NULL; |
8 | if ((error = checkarg(argc, "focus_follows_mouse", EXPECTED_EQUAL_TO, 1))) { | 8 | if ((error = checkarg(argc, "focus_follows_mouse", EXPECTED_EQUAL_TO, 1))) { |
9 | return error; | 9 | return error; |
10 | } else if(strcmp(argv[0], "no") == 0) { | ||
11 | config->focus_follows_mouse = FOLLOWS_NO; | ||
12 | } else if(strcmp(argv[0], "yes") == 0) { | ||
13 | config->focus_follows_mouse = FOLLOWS_YES; | ||
14 | } else if(strcmp(argv[0], "always") == 0) { | ||
15 | config->focus_follows_mouse = FOLLOWS_ALWAYS; | ||
16 | } else { | ||
17 | return cmd_results_new(CMD_FAILURE, "focus_follows_mouse", | ||
18 | "Expected 'focus_follows_mouse no|yes|always'"); | ||
10 | } | 19 | } |
11 | config->focus_follows_mouse = | ||
12 | parse_boolean(argv[0], config->focus_follows_mouse); | ||
13 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 20 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
14 | } | 21 | } |