aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorMihai Coman <mihai.cmn@gmail.com>2018-10-25 23:20:38 +0300
committerMihai Coman <mihai.cmn@gmail.com>2018-10-25 23:20:38 +0300
commit5323551a7f425bfbb2d8239a04137b50e7a3d43d (patch)
treeef136bf47847c2fbf8407efbff0cfe5c466f425f /sway/tree/container.c
parent73b7c5cc05105018e86e4289ac607434783b7647 (diff)
Fix re-tiling for floating containers
When a floating container is tiled (e.g.: 'floating toggle' or 'floating disable'), it should be placed after/below the inactive focused container from the tiling layout.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 58d3df34..8ab6ebf8 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -676,11 +676,8 @@ void container_set_floating(struct sway_container *container, bool enable) {
container_detach(container);
struct sway_container *reference =
seat_get_focus_inactive_tiling(seat, workspace);
- if (reference && reference->view) {
- reference = reference->parent;
- }
if (reference) {
- container_add_child(reference, container);
+ container_add_sibling(reference, container, 1);
container->width = reference->width;
container->height = reference->height;
} else {