aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-03-29 16:17:55 -0400
committerTony Crisci <tony@dubstepdish.com>2018-03-29 16:40:40 -0400
commitb90099b4b7df8068446c658ab99b58ff83648954 (patch)
treea822ef3605ce98f9d8633c24f6927bb11effbdcc /sway/commands
parent83d09cf5945ba10a703dc5cc977a6d2814f0fd64 (diff)
rename container functions
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/focus.c4
-rw-r--r--sway/commands/kill.c2
-rw-r--r--sway/commands/layout.c4
-rw-r--r--sway/commands/output.c2
-rw-r--r--sway/commands/workspace.c12
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,
}
struct cmd_results *cmd_focus(int argc, char **argv) {
- swayc_t *con = config->handler_context.current_container;
+ struct sway_container *con = config->handler_context.current_container;
struct sway_seat *seat = config->handler_context.seat;
if (con->type < C_WORKSPACE) {
return cmd_results_new(CMD_FAILURE, "focus",
@@ -51,7 +51,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
"Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'");
}
- swayc_t *next_focus = get_swayc_in_direction(con, seat, direction);
+ struct sway_container *next_focus = get_swayc_in_direction(con, seat, direction);
if (next_focus) {
sway_seat_set_focus(seat, next_focus);
}
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 @@
#include "sway/commands.h"
struct cmd_results *cmd_kill(int argc, char **argv) {
- enum swayc_types type = config->handler_context.current_container->type;
+ enum sway_container_type type = config->handler_context.current_container->type;
if (type != C_VIEW && type != C_CONTAINER) {
return cmd_results_new(CMD_INVALID, NULL,
"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) {
if ((error = checkarg(argc, "layout", EXPECTED_MORE_THAN, 0))) {
return error;
}
- swayc_t *parent = config->handler_context.current_container;
+ struct sway_container *parent = config->handler_context.current_container;
// TODO: floating
/*
@@ -28,7 +28,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
if (strcasecmp(argv[0], "default") == 0) {
swayc_change_layout(parent, parent->prev_layout);
if (parent->layout == L_NONE) {
- swayc_t *output = swayc_parent_by_type(parent, C_OUTPUT);
+ struct sway_container *output = sway_container_parent(parent, C_OUTPUT);
swayc_change_layout(parent, default_layout(output));
}
} 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) {
char identifier[128];
bool all = strcmp(output->name, "*") == 0;
for (int i = 0; i < root_container.children->length; ++i) {
- swayc_t *cont = root_container.children->items[i];
+ struct sway_container *cont = root_container.children->items[i];
if (cont->type != C_OUTPUT) {
continue;
}
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) {
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 = sway_container_parent(current_container, C_WORKSPACE);
}
- old_output = swayc_parent_by_type(current_container, C_OUTPUT);
+ old_output = sway_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 = sway_container_parent(current_container, C_OUTPUT);
if (config->mouse_warping && old_output != new_output) {
// TODO: Warp mouse