aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 97ffe91c..8564f3ff 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -179,17 +179,17 @@ static struct cmd_results *focus_mode(struct sway_workspace *ws,
seat_set_focus_container(seat, new_focus);
seat_consider_warp_to_focus(seat);
} else {
- return cmd_results_new(CMD_FAILURE, "focus",
+ return cmd_results_new(CMD_FAILURE,
"Failed to find a %s container in workspace",
floating ? "floating" : "tiling");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
static struct cmd_results *focus_output(struct sway_seat *seat,
int argc, char **argv) {
if (!argc) {
- return cmd_results_new(CMD_INVALID, "focus",
+ return cmd_results_new(CMD_INVALID,
"Expected 'focus output <direction|name>'");
}
char *identifier = join_args(argv, argc);
@@ -199,7 +199,7 @@ static struct cmd_results *focus_output(struct sway_seat *seat,
enum wlr_direction direction;
if (!parse_direction(identifier, &direction)) {
free(identifier);
- return cmd_results_new(CMD_INVALID, "focus",
+ return cmd_results_new(CMD_INVALID,
"There is no output with that name");
}
struct sway_workspace *ws = seat_get_focused_workspace(seat);
@@ -223,21 +223,21 @@ static struct cmd_results *focus_output(struct sway_seat *seat,
seat_consider_warp_to_focus(seat);
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
static struct cmd_results *focus_parent(void) {
struct sway_seat *seat = config->handler_context.seat;
struct sway_container *con = config->handler_context.container;
if (!con || con->is_fullscreen) {
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
struct sway_node *parent = node_get_parent(&con->node);
if (parent) {
seat_set_focus(seat, parent);
seat_consider_warp_to_focus(seat);
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
static struct cmd_results *focus_child(void) {
@@ -248,15 +248,15 @@ static struct cmd_results *focus_child(void) {
seat_set_focus(seat, focus);
seat_consider_warp_to_focus(seat);
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
struct cmd_results *cmd_focus(int argc, char **argv) {
if (config->reading || !config->active) {
- return cmd_results_new(CMD_DEFER, NULL, NULL);
+ return cmd_results_new(CMD_DEFER, NULL);
}
if (!root->outputs->length) {
- return cmd_results_new(CMD_INVALID, "focus",
+ return cmd_results_new(CMD_INVALID,
"Can't run this command while there's no outputs connected.");
}
struct sway_node *node = config->handler_context.node;
@@ -264,7 +264,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
struct sway_workspace *workspace = config->handler_context.workspace;
struct sway_seat *seat = config->handler_context.seat;
if (node->type < N_WORKSPACE) {
- return cmd_results_new(CMD_FAILURE, "focus",
+ return cmd_results_new(CMD_FAILURE,
"Command 'focus' cannot be used above the workspace level");
}
@@ -274,7 +274,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
}
seat_set_focus_container(seat, container);
seat_consider_warp_to_focus(seat);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
if (strcmp(argv[0], "floating") == 0) {
@@ -300,7 +300,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
enum wlr_direction direction = 0;
if (!parse_direction(argv[0], &direction)) {
- return cmd_results_new(CMD_INVALID, "focus",
+ return cmd_results_new(CMD_INVALID,
"Expected 'focus <direction|parent|child|mode_toggle|floating|tiling>' "
"or 'focus output <direction|name>'");
}
@@ -310,14 +310,14 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
struct sway_output *new_output =
output_get_in_direction(workspace->output, direction);
if (!new_output) {
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
struct sway_node *node =
get_node_in_output_direction(new_output, direction);
seat_set_focus(seat, node);
seat_consider_warp_to_focus(seat);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
struct sway_node *next_focus =
@@ -327,5 +327,5 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
seat_consider_warp_to_focus(seat);
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}