aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ronan Pigott <rpigott@berkeley.edu>2020-10-25 14:20:11 -0700
committerLibravatar Tudor Brindus <me@tbrindus.ca>2020-12-20 00:58:42 -0500
commitece6a1d408456ade74c88dee7d4b9e0491f0bdaf (patch)
tree09f5a40a02347c927a91ab66da6c794cfd787c97 /sway/tree/container.c
parentRevert "commands/move: maintain workspace_layout when moving" (diff)
downloadsway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.tar.gz
sway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.tar.zst
sway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.zip
Change workspace_layout to match i3 behavior
In i3, the workspace_layout command does not affect the workspace layout. Instead, new workspace level containers are wrapped in the desired layout and the workspace layout always defaults to the output orientation.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index b0d23700..23b6c997 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -804,9 +804,10 @@ void container_set_floating(struct sway_container *container, bool enable) {
804 container->width = reference->width; 804 container->width = reference->width;
805 container->height = reference->height; 805 container->height = reference->height;
806 } else { 806 } else {
807 workspace_add_tiling(workspace, container); 807 struct sway_container *other =
808 container->width = workspace->width; 808 workspace_add_tiling(workspace, container);
809 container->height = workspace->height; 809 other->width = workspace->width;
810 other->height = workspace->height;
810 } 811 }
811 if (container->view) { 812 if (container->view) {
812 view_set_tiled(container->view, true); 813 view_set_tiled(container->view, true);