mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
add workspace_layout, ensure ws is always L_HORIZ
Add swayc_change_layout function, which changes either layout or workspace_layout, depending on the container type. Workspace being always L_HORIZ makes this much more i3-compatible.
This commit is contained in:
parent
0ddc4279d1
commit
571321a1d8
7 changed files with 35 additions and 16 deletions
|
|
@ -37,7 +37,7 @@ struct cmd_results *cmd_move(int argc, char **argv) {
|
|||
if (!view->children || view->children->length == 0) {
|
||||
return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace");
|
||||
}
|
||||
view = new_container(view, view->layout);
|
||||
view = new_container(view, view->workspace_layout);
|
||||
} if (view->type != C_CONTAINER && view->type != C_VIEW) {
|
||||
return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views.");
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ struct cmd_results *cmd_move(int argc, char **argv) {
|
|||
if (!view->children || view->children->length == 0) {
|
||||
return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace");
|
||||
}
|
||||
view = new_container(view, view->layout);
|
||||
view = new_container(view, view->workspace_layout);
|
||||
} else if (view->type != C_CONTAINER && view->type != C_VIEW) {
|
||||
return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views.");
|
||||
} else if (!(output = output_by_name(argv[3], &abs_pos))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue