aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/workspace.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 16:17:55 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 16:40:40 -0400
commitb90099b4b7df8068446c658ab99b58ff83648954 (patch)
treea822ef3605ce98f9d8633c24f6927bb11effbdcc /sway/commands/workspace.c
parentremove swayc_t typedef (diff)
downloadsway-b90099b4b7df8068446c658ab99b58ff83648954.tar.gz
sway-b90099b4b7df8068446c658ab99b58ff83648954.tar.zst
sway-b90099b4b7df8068446c658ab99b58ff83648954.zip
rename container functions
Diffstat (limited to 'sway/commands/workspace.c')
-rw-r--r--sway/commands/workspace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 8751dffe..8b7139a9 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -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 = sway_container_parent(current_container, C_WORKSPACE);
27 } 27 }
28 old_output = swayc_parent_by_type(current_container, C_OUTPUT); 28 old_output = sway_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 = sway_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