diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/focus.c | 4 | ||||
-rw-r--r-- | sway/commands/move.c | 8 | ||||
-rw-r--r-- | sway/commands/seat.c | 11 | ||||
-rw-r--r-- | sway/commands/workspace.c | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 0a521b9e..74d9d535 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -36,7 +36,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) { } if (argc == 0) { - sway_seat_set_focus(seat, con); + seat_set_focus(seat, con); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } @@ -50,7 +50,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) { struct sway_container *next_focus = container_get_in_direction( con, seat, direction); if (next_focus) { - sway_seat_set_focus(seat, next_focus); + seat_set_focus(seat, next_focus); } return cmd_results_new(CMD_SUCCESS, NULL, NULL); diff --git a/sway/commands/move.c b/sway/commands/move.c index ab959b77..644c622b 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -78,10 +78,10 @@ static struct cmd_results *cmd_move_container(struct sway_container *current, } free(ws_name); struct sway_container *old_parent = current->parent; - struct sway_container *focus = sway_seat_get_focus_inactive( + struct sway_container *focus = seat_get_focus_inactive( config->handler_context.seat, ws); container_move_to(current, focus); - sway_seat_set_focus(config->handler_context.seat, old_parent); + seat_set_focus(config->handler_context.seat, old_parent); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } else if (strcasecmp(argv[1], "to") == 0 && strcasecmp(argv[2], "output") == 0) { @@ -100,7 +100,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current, return cmd_results_new(CMD_FAILURE, "move workspace", "Can't find output with name/direction '%s'", argv[3]); } - struct sway_container *focus = sway_seat_get_focus_inactive( + struct sway_container *focus = seat_get_focus_inactive( config->handler_context.seat, destination); if (!focus) { // We've never been to this output before @@ -108,7 +108,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current, } struct sway_container *old_parent = current->parent; container_move_to(current, focus); - sway_seat_set_focus(config->handler_context.seat, old_parent); + seat_set_focus(config->handler_context.seat, old_parent); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } return cmd_results_new(CMD_INVALID, "move", expected_syntax); diff --git a/sway/commands/seat.c b/sway/commands/seat.c index 45079616..819b769c 100644 --- a/sway/commands/seat.c +++ b/sway/commands/seat.c @@ -14,7 +14,8 @@ struct cmd_results *cmd_seat(int argc, char **argv) { free_seat_config(config->handler_context.seat_config); config->handler_context.seat_config = new_seat_config(argv[0]); if (!config->handler_context.seat_config) { - return cmd_results_new(CMD_FAILURE, NULL, "Couldn't allocate config"); + return cmd_results_new(CMD_FAILURE, NULL, + "Couldn't allocate config"); } wlr_log(L_DEBUG, "entering seat block: %s", argv[0]); return cmd_results_new(CMD_BLOCK_SEAT, NULL, NULL); @@ -28,7 +29,8 @@ struct cmd_results *cmd_seat(int argc, char **argv) { if (!has_context) { config->handler_context.seat_config = new_seat_config(argv[0]); if (!config->handler_context.seat_config) { - return cmd_results_new(CMD_FAILURE, NULL, "Couldn't allocate config"); + return cmd_results_new(CMD_FAILURE, NULL, + "Couldn't allocate config"); } } @@ -41,7 +43,10 @@ struct cmd_results *cmd_seat(int argc, char **argv) { } else if (strcasecmp("fallback", argv[1]) == 0) { res = seat_cmd_fallback(argc_new, argv_new); } else { - res = cmd_results_new(CMD_INVALID, "seat <name>", "Unknown command %s", argv[1]); + res = + cmd_results_new(CMD_INVALID, + "seat <name>", "Unknown command %s", + argv[1]); } if (!has_context) { diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c index 8f39e5fc..aa4096f7 100644 --- a/sway/commands/workspace.c +++ b/sway/commands/workspace.c @@ -91,7 +91,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { } workspace_switch(ws); current_container = - sway_seat_get_focus(config->handler_context.seat); + seat_get_focus(config->handler_context.seat); struct sway_container *new_output = container_parent(current_container, C_OUTPUT); if (config->mouse_warping && old_output != new_output) { |