diff options
-rw-r--r-- | sway/tree/layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index b175f567..bc7ee6bb 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -521,7 +521,6 @@ void container_move(struct sway_container *container, | |||
521 | sibling = NULL; | 521 | sibling = NULL; |
522 | } else { | 522 | } else { |
523 | wlr_log(L_DEBUG, "Reparenting container (perpendicular)"); | 523 | wlr_log(L_DEBUG, "Reparenting container (perpendicular)"); |
524 | container_remove_child(container); | ||
525 | struct sway_container *focus_inactive = seat_get_focus_inactive( | 524 | struct sway_container *focus_inactive = seat_get_focus_inactive( |
526 | config->handler_context.seat, sibling); | 525 | config->handler_context.seat, sibling); |
527 | if (focus_inactive) { | 526 | if (focus_inactive) { |
@@ -534,9 +533,11 @@ void container_move(struct sway_container *container, | |||
534 | continue; | 533 | continue; |
535 | } else if (sibling->children->length) { | 534 | } else if (sibling->children->length) { |
536 | wlr_log(L_DEBUG, "No focus-inactive, adding arbitrarily"); | 535 | wlr_log(L_DEBUG, "No focus-inactive, adding arbitrarily"); |
536 | container_remove_child(container); | ||
537 | container_add_sibling(sibling->children->items[0], container); | 537 | container_add_sibling(sibling->children->items[0], container); |
538 | } else { | 538 | } else { |
539 | wlr_log(L_DEBUG, "No kiddos, adding container alone"); | 539 | wlr_log(L_DEBUG, "No kiddos, adding container alone"); |
540 | container_remove_child(container); | ||
540 | container_add_child(sibling, container); | 541 | container_add_child(sibling, container); |
541 | } | 542 | } |
542 | container->width = container->height = 0; | 543 | container->width = container->height = 0; |