diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 23:41:33 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 23:41:33 -0400 |
commit | dc8c9fbeb664518c76066cc28ee29452c6c30128 (patch) | |
tree | 88c2de0d08e00b2a30cb20cdfadfa6e53f5c59b4 /sway/commands/focus.c | |
parent | Merge pull request #1653 from swaywm/revert-1647-refactor-tree (diff) | |
download | sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.gz sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.zst sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.zip |
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing
changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0.
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index f1a8078f..64f079f4 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -3,10 +3,11 @@ | |||
3 | #include "log.h" | 3 | #include "log.h" |
4 | #include "sway/input/input-manager.h" | 4 | #include "sway/input/input-manager.h" |
5 | #include "sway/input/seat.h" | 5 | #include "sway/input/seat.h" |
6 | #include "sway/view.h" | 6 | #include "sway/tree/view.h" |
7 | #include "sway/commands.h" | 7 | #include "sway/commands.h" |
8 | 8 | ||
9 | static bool parse_movement_direction(const char *name, enum movement_direction *out) { | 9 | static bool parse_movement_direction(const char *name, |
10 | enum movement_direction *out) { | ||
10 | if (strcasecmp(name, "left") == 0) { | 11 | if (strcasecmp(name, "left") == 0) { |
11 | *out = MOVE_LEFT; | 12 | *out = MOVE_LEFT; |
12 | } else if (strcasecmp(name, "right") == 0) { | 13 | } else if (strcasecmp(name, "right") == 0) { |
@@ -31,7 +32,7 @@ static bool parse_movement_direction(const char *name, enum movement_direction * | |||
31 | } | 32 | } |
32 | 33 | ||
33 | struct cmd_results *cmd_focus(int argc, char **argv) { | 34 | struct cmd_results *cmd_focus(int argc, char **argv) { |
34 | swayc_t *con = config->handler_context.current_container; | 35 | struct sway_container *con = config->handler_context.current_container; |
35 | struct sway_seat *seat = config->handler_context.seat; | 36 | struct sway_seat *seat = config->handler_context.seat; |
36 | if (con->type < C_WORKSPACE) { | 37 | if (con->type < C_WORKSPACE) { |
37 | return cmd_results_new(CMD_FAILURE, "focus", | 38 | return cmd_results_new(CMD_FAILURE, "focus", |
@@ -50,7 +51,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) { | |||
50 | "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); | 51 | "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); |
51 | } | 52 | } |
52 | 53 | ||
53 | swayc_t *next_focus = get_swayc_in_direction(con, seat, direction); | 54 | struct sway_container *next_focus = container_get_in_direction(con, seat, direction); |
54 | if (next_focus) { | 55 | if (next_focus) { |
55 | sway_seat_set_focus(seat, next_focus); | 56 | sway_seat_set_focus(seat, next_focus); |
56 | } | 57 | } |