diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 16:17:55 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 16:40:40 -0400 |
commit | b90099b4b7df8068446c658ab99b58ff83648954 (patch) | |
tree | a822ef3605ce98f9d8633c24f6927bb11effbdcc /sway/commands | |
parent | remove swayc_t typedef (diff) | |
download | sway-b90099b4b7df8068446c658ab99b58ff83648954.tar.gz sway-b90099b4b7df8068446c658ab99b58ff83648954.tar.zst sway-b90099b4b7df8068446c658ab99b58ff83648954.zip |
rename container functions
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/focus.c | 4 | ||||
-rw-r--r-- | sway/commands/kill.c | 2 | ||||
-rw-r--r-- | sway/commands/layout.c | 4 | ||||
-rw-r--r-- | sway/commands/output.c | 2 | ||||
-rw-r--r-- | sway/commands/workspace.c | 12 |
5 files changed, 12 insertions, 12 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 18e9e0bf..64b05904 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -32,7 +32,7 @@ static bool parse_movement_direction(const char *name, | |||
32 | } | 32 | } |
33 | 33 | ||
34 | struct cmd_results *cmd_focus(int argc, char **argv) { | 34 | struct cmd_results *cmd_focus(int argc, char **argv) { |
35 | swayc_t *con = config->handler_context.current_container; | 35 | struct sway_container *con = config->handler_context.current_container; |
36 | struct sway_seat *seat = config->handler_context.seat; | 36 | struct sway_seat *seat = config->handler_context.seat; |
37 | if (con->type < C_WORKSPACE) { | 37 | if (con->type < C_WORKSPACE) { |
38 | return cmd_results_new(CMD_FAILURE, "focus", | 38 | return cmd_results_new(CMD_FAILURE, "focus", |
@@ -51,7 +51,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) { | |||
51 | "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>'"); |
52 | } | 52 | } |
53 | 53 | ||
54 | swayc_t *next_focus = get_swayc_in_direction(con, seat, direction); | 54 | struct sway_container *next_focus = get_swayc_in_direction(con, seat, direction); |
55 | if (next_focus) { | 55 | if (next_focus) { |
56 | sway_seat_set_focus(seat, next_focus); | 56 | sway_seat_set_focus(seat, next_focus); |
57 | } | 57 | } |
diff --git a/sway/commands/kill.c b/sway/commands/kill.c index c0faed7a..f6774767 100644 --- a/sway/commands/kill.c +++ b/sway/commands/kill.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include "sway/commands.h" | 6 | #include "sway/commands.h" |
7 | 7 | ||
8 | struct cmd_results *cmd_kill(int argc, char **argv) { | 8 | struct cmd_results *cmd_kill(int argc, char **argv) { |
9 | enum swayc_types type = config->handler_context.current_container->type; | 9 | enum sway_container_type type = config->handler_context.current_container->type; |
10 | if (type != C_VIEW && type != C_CONTAINER) { | 10 | if (type != C_VIEW && type != C_CONTAINER) { |
11 | return cmd_results_new(CMD_INVALID, NULL, | 11 | return cmd_results_new(CMD_INVALID, NULL, |
12 | "Can only kill views and containers with this command"); | 12 | "Can only kill views and containers with this command"); |
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 2b193136..e10334e2 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c | |||
@@ -10,7 +10,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) { | |||
10 | if ((error = checkarg(argc, "layout", EXPECTED_MORE_THAN, 0))) { | 10 | if ((error = checkarg(argc, "layout", EXPECTED_MORE_THAN, 0))) { |
11 | return error; | 11 | return error; |
12 | } | 12 | } |
13 | swayc_t *parent = config->handler_context.current_container; | 13 | struct sway_container *parent = config->handler_context.current_container; |
14 | 14 | ||
15 | // TODO: floating | 15 | // TODO: floating |
16 | /* | 16 | /* |
@@ -28,7 +28,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) { | |||
28 | if (strcasecmp(argv[0], "default") == 0) { | 28 | if (strcasecmp(argv[0], "default") == 0) { |
29 | swayc_change_layout(parent, parent->prev_layout); | 29 | swayc_change_layout(parent, parent->prev_layout); |
30 | if (parent->layout == L_NONE) { | 30 | if (parent->layout == L_NONE) { |
31 | swayc_t *output = swayc_parent_by_type(parent, C_OUTPUT); | 31 | struct sway_container *output = sway_container_parent(parent, C_OUTPUT); |
32 | swayc_change_layout(parent, default_layout(output)); | 32 | swayc_change_layout(parent, default_layout(output)); |
33 | } | 33 | } |
34 | } else { | 34 | } else { |
diff --git a/sway/commands/output.c b/sway/commands/output.c index 35bc8099..f7e3372c 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c | |||
@@ -296,7 +296,7 @@ struct cmd_results *cmd_output(int argc, char **argv) { | |||
296 | char identifier[128]; | 296 | char identifier[128]; |
297 | bool all = strcmp(output->name, "*") == 0; | 297 | bool all = strcmp(output->name, "*") == 0; |
298 | for (int i = 0; i < root_container.children->length; ++i) { | 298 | for (int i = 0; i < root_container.children->length; ++i) { |
299 | swayc_t *cont = root_container.children->items[i]; | 299 | struct sway_container *cont = root_container.children->items[i]; |
300 | if (cont->type != C_OUTPUT) { | 300 | if (cont->type != C_OUTPUT) { |
301 | continue; | 301 | continue; |
302 | } | 302 | } |
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 |