aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/workspace.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-30 00:00:23 -0400
committerGitHub <noreply@github.com>2018-03-30 00:00:23 -0400
commit7162b9bea4d66d61376ad3605e23e2d83bb95201 (patch)
tree6f7a3121f15503a923c1ce53bf2bee368c6149a6 /sway/commands/workspace.c
parent472e81f35d689d67cda241acafda91c688d61046 (diff)
parent8f490d7d2dbadfe85dcf3dcd972471e86671442a (diff)
downloadsway-7162b9bea4d66d61376ad3605e23e2d83bb95201.tar.xz
Merge pull request #1654 from acrisci/refactor-2-electric-boogaloo
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
Diffstat (limited to 'sway/commands/workspace.c')
-rw-r--r--sway/commands/workspace.c14
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 @@
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/input/seat.h"
-#include "sway/workspace.h"
+#include "sway/tree/workspace.h"
#include "list.h"
#include "log.h"
#include "stringop.h"
@@ -17,15 +17,15 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
int output_location = -1;
- swayc_t *current_container = config->handler_context.current_container;
- swayc_t *old_workspace = NULL, *old_output = NULL;
+ struct sway_container *current_container = config->handler_context.current_container;
+ struct sway_container *old_workspace = NULL, *old_output = NULL;
if (current_container) {
if (current_container->type == C_WORKSPACE) {
old_workspace = current_container;
} else {
- old_workspace = swayc_parent_by_type(current_container, C_WORKSPACE);
+ old_workspace = container_parent(current_container, C_WORKSPACE);
}
- old_output = swayc_parent_by_type(current_container, C_OUTPUT);
+ old_output = container_parent(current_container, C_OUTPUT);
}
for (int i = 0; i < argc; ++i) {
@@ -57,7 +57,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
if (config->reading || !config->active) {
return cmd_results_new(CMD_DEFER, "workspace", NULL);
}
- swayc_t *ws = NULL;
+ struct sway_container *ws = NULL;
if (strcasecmp(argv[0], "number") == 0) {
if (!(ws = workspace_by_number(argv[1]))) {
char *name = join_args(argv + 1, argc - 1);
@@ -92,7 +92,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
workspace_switch(ws);
current_container =
sway_seat_get_focus(config->handler_context.seat);
- swayc_t *new_output = swayc_parent_by_type(current_container, C_OUTPUT);
+ struct sway_container *new_output = container_parent(current_container, C_OUTPUT);
if (config->mouse_warping && old_output != new_output) {
// TODO: Warp mouse