mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Merge branch 'wlroots' into split-containers
This commit is contained in:
commit
d434da5632
32 changed files with 804 additions and 241 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue