aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
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) {
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);