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/workspace.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/workspace.c')
-rw-r--r-- | sway/commands/workspace.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c index fa891398..8f39e5fc 100644 --- a/sway/commands/workspace.c +++ b/sway/commands/workspace.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "sway/commands.h" | 4 | #include "sway/commands.h" |
5 | #include "sway/config.h" | 5 | #include "sway/config.h" |
6 | #include "sway/input/seat.h" | 6 | #include "sway/input/seat.h" |
7 | #include "sway/workspace.h" | 7 | #include "sway/tree/workspace.h" |
8 | #include "list.h" | 8 | #include "list.h" |
9 | #include "log.h" | 9 | #include "log.h" |
10 | #include "stringop.h" | 10 | #include "stringop.h" |
@@ -17,15 +17,15 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
17 | 17 | ||
18 | int output_location = -1; | 18 | int output_location = -1; |
19 | 19 | ||
20 | swayc_t *current_container = config->handler_context.current_container; | 20 | struct sway_container *current_container = config->handler_context.current_container; |
21 | swayc_t *old_workspace = NULL, *old_output = NULL; | 21 | struct sway_container *old_workspace = NULL, *old_output = NULL; |
22 | if (current_container) { | 22 | if (current_container) { |
23 | if (current_container->type == C_WORKSPACE) { | 23 | if (current_container->type == C_WORKSPACE) { |
24 | old_workspace = current_container; | 24 | old_workspace = current_container; |
25 | } else { | 25 | } else { |
26 | old_workspace = swayc_parent_by_type(current_container, C_WORKSPACE); | 26 | old_workspace = container_parent(current_container, C_WORKSPACE); |
27 | } | 27 | } |
28 | old_output = swayc_parent_by_type(current_container, C_OUTPUT); | 28 | old_output = container_parent(current_container, C_OUTPUT); |
29 | } | 29 | } |
30 | 30 | ||
31 | for (int i = 0; i < argc; ++i) { | 31 | for (int i = 0; i < argc; ++i) { |
@@ -57,7 +57,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
57 | if (config->reading || !config->active) { | 57 | if (config->reading || !config->active) { |
58 | return cmd_results_new(CMD_DEFER, "workspace", NULL); | 58 | return cmd_results_new(CMD_DEFER, "workspace", NULL); |
59 | } | 59 | } |
60 | swayc_t *ws = NULL; | 60 | struct sway_container *ws = NULL; |
61 | if (strcasecmp(argv[0], "number") == 0) { | 61 | if (strcasecmp(argv[0], "number") == 0) { |
62 | if (!(ws = workspace_by_number(argv[1]))) { | 62 | if (!(ws = workspace_by_number(argv[1]))) { |
63 | char *name = join_args(argv + 1, argc - 1); | 63 | char *name = join_args(argv + 1, argc - 1); |
@@ -92,7 +92,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
92 | workspace_switch(ws); | 92 | workspace_switch(ws); |
93 | current_container = | 93 | current_container = |
94 | sway_seat_get_focus(config->handler_context.seat); | 94 | sway_seat_get_focus(config->handler_context.seat); |
95 | swayc_t *new_output = swayc_parent_by_type(current_container, C_OUTPUT); | 95 | struct sway_container *new_output = container_parent(current_container, C_OUTPUT); |
96 | 96 | ||
97 | if (config->mouse_warping && old_output != new_output) { | 97 | if (config->mouse_warping && old_output != new_output) { |
98 | // TODO: Warp mouse | 98 | // TODO: Warp mouse |