summaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 64f079f4..74d9d535 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -20,10 +20,6 @@ static bool parse_movement_direction(const char *name,
20 *out = MOVE_PARENT; 20 *out = MOVE_PARENT;
21 } else if (strcasecmp(name, "child") == 0) { 21 } else if (strcasecmp(name, "child") == 0) {
22 *out = MOVE_CHILD; 22 *out = MOVE_CHILD;
23 } else if (strcasecmp(name, "next") == 0) {
24 *out = MOVE_NEXT;
25 } else if (strcasecmp(name, "prev") == 0) {
26 *out = MOVE_PREV;
27 } else { 23 } else {
28 return false; 24 return false;
29 } 25 }
@@ -40,7 +36,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
40 } 36 }
41 37
42 if (argc == 0) { 38 if (argc == 0) {
43 sway_seat_set_focus(seat, con); 39 seat_set_focus(seat, con);
44 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 40 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
45 } 41 }
46 42
@@ -51,9 +47,10 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
51 "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); 47 "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'");
52 } 48 }
53 49
54 struct sway_container *next_focus = container_get_in_direction(con, seat, direction); 50 struct sway_container *next_focus = container_get_in_direction(
51 con, seat, direction);
55 if (next_focus) { 52 if (next_focus) {
56 sway_seat_set_focus(seat, next_focus); 53 seat_set_focus(seat, next_focus);
57 } 54 }
58 55
59 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 56 return cmd_results_new(CMD_SUCCESS, NULL, NULL);