diff options
-rw-r--r-- | sway/tree/container.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 71babe5c..2332d81f 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1030,10 +1030,13 @@ void container_set_floating(struct sway_container *container, bool enable) { | |||
1030 | if (container->scratchpad) { | 1030 | if (container->scratchpad) { |
1031 | scratchpad_remove_container(container); | 1031 | scratchpad_remove_container(container); |
1032 | } | 1032 | } |
1033 | struct sway_container *sibling = | ||
1034 | seat_get_focus_inactive_tiling(seat, workspace); | ||
1035 | container_remove_child(container); | 1033 | container_remove_child(container); |
1036 | container_add_sibling(sibling, container); | 1034 | struct sway_container *reference = |
1035 | seat_get_focus_inactive_tiling(seat, workspace); | ||
1036 | if (reference->type == C_VIEW) { | ||
1037 | reference = reference->parent; | ||
1038 | } | ||
1039 | container_add_child(reference, container); | ||
1037 | container->width = container->parent->width; | 1040 | container->width = container->parent->width; |
1038 | container->height = container->parent->height; | 1041 | container->height = container->parent->height; |
1039 | if (container->type == C_VIEW) { | 1042 | if (container->type == C_VIEW) { |