diff options
author | Ronan Pigott <[email protected]> | 2020-10-25 14:20:11 -0700 |
---|---|---|
committer | Tudor Brindus <[email protected]> | 2020-12-20 00:58:42 -0500 |
commit | ece6a1d408456ade74c88dee7d4b9e0491f0bdaf (patch) | |
tree | 09f5a40a02347c927a91ab66da6c794cfd787c97 /sway/tree/container.c | |
parent | b4850876dc609830575531fd6e0ca696c956ae94 (diff) |
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.c | 7 |
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) { container->width = reference->width; container->height = reference->height; } else { - workspace_add_tiling(workspace, container); - container->width = workspace->width; - container->height = workspace->height; + struct sway_container *other = + workspace_add_tiling(workspace, container); + other->width = workspace->width; + other->height = workspace->height; } if (container->view) { view_set_tiled(container->view, true); |