diff options
author | D.B <thejan.2009@gmail.com> | 2016-10-10 20:44:09 +0200 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-10-11 09:16:59 +0200 |
commit | 571321a1d84a1eb2867fbdc39f7f828aa2c64a01 (patch) | |
tree | ad61090d261ccec47efc36b19f2b7266a01c1bdc /sway/commands/move.c | |
parent | wrap workspace's child into a container if needed (diff) | |
download | sway-571321a1d84a1eb2867fbdc39f7f828aa2c64a01.tar.gz sway-571321a1d84a1eb2867fbdc39f7f828aa2c64a01.tar.zst sway-571321a1d84a1eb2867fbdc39f7f828aa2c64a01.zip |
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.
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index 48e9d562..4819d9ef 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -37,7 +37,7 @@ struct cmd_results *cmd_move(int argc, char **argv) { | |||
37 | if (!view->children || view->children->length == 0) { | 37 | if (!view->children || view->children->length == 0) { |
38 | return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace"); | 38 | return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace"); |
39 | } | 39 | } |
40 | view = new_container(view, view->layout); | 40 | view = new_container(view, view->workspace_layout); |
41 | } if (view->type != C_CONTAINER && view->type != C_VIEW) { | 41 | } if (view->type != C_CONTAINER && view->type != C_VIEW) { |
42 | return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views."); | 42 | return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views."); |
43 | } | 43 | } |
@@ -65,7 +65,7 @@ struct cmd_results *cmd_move(int argc, char **argv) { | |||
65 | if (!view->children || view->children->length == 0) { | 65 | if (!view->children || view->children->length == 0) { |
66 | return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace"); | 66 | return cmd_results_new(CMD_FAILURE, "move", "Cannot move an empty workspace"); |
67 | } | 67 | } |
68 | view = new_container(view, view->layout); | 68 | view = new_container(view, view->workspace_layout); |
69 | } else if (view->type != C_CONTAINER && view->type != C_VIEW) { | 69 | } else if (view->type != C_CONTAINER && view->type != C_VIEW) { |
70 | return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views."); | 70 | return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views."); |
71 | } else if (!(output = output_by_name(argv[3], &abs_pos))) { | 71 | } else if (!(output = output_by_name(argv[3], &abs_pos))) { |