aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-06-01 01:06:02 -0400
committerBrian Ashworth <bosrsf04@gmail.com>2018-06-01 01:12:10 -0400
commit8237d944d48c0b60ad4038f4a556d4b8d80a9292 (patch)
treea618a4520a3b5ec44e32d0f95fb3d241afe5bb71 /sway/tree
parent4495ec64b2c41ba890d7982d1cf60a3099eb4c97 (diff)
downloadsway-8237d944d48c0b60ad4038f4a556d4b8d80a9292.tar.xz
Fix move perpendicular segfault
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/layout.c3
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,
sibling = NULL;
} else {
wlr_log(L_DEBUG, "Reparenting container (perpendicular)");
- container_remove_child(container);
struct sway_container *focus_inactive = seat_get_focus_inactive(
config->handler_context.seat, sibling);
if (focus_inactive) {
@@ -534,9 +533,11 @@ void container_move(struct sway_container *container,
continue;
} else if (sibling->children->length) {
wlr_log(L_DEBUG, "No focus-inactive, adding arbitrarily");
+ container_remove_child(container);
container_add_sibling(sibling->children->items[0], container);
} else {
wlr_log(L_DEBUG, "No kiddos, adding container alone");
+ container_remove_child(container);
container_add_child(sibling, container);
}
container->width = container->height = 0;