From 2f6935e00f67c8cd81119504437ddf8e789f6eb3 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 13 Sep 2018 17:02:10 +1000 Subject: Remove bad assertion in workspace_rejigger The assertion can be (rightfully) triggered by creating layout V[H[view view] view] and moving the top right view to the right. After removing the assertion I found the container being moved needs its size reset to prevent it from being sized wrongly after arranging. --- sway/commands/move.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sway/commands/move.c') diff --git a/sway/commands/move.c b/sway/commands/move.c index cd970983..8f0ef230 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -259,9 +259,6 @@ static void container_move_to_container(struct sway_container *container, * In other words, rejigger it. */ static void workspace_rejigger(struct sway_workspace *ws, struct sway_container *child, enum movement_direction move_dir) { - if (!sway_assert(child->parent == NULL, "Expected a root child")) { - return; - } container_detach(child); workspace_wrap_children(ws); @@ -270,6 +267,7 @@ static void workspace_rejigger(struct sway_workspace *ws, ws->layout = move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT; workspace_update_representation(ws); + child->width = child->height = 0; } static void move_out_of_tabs_stacks(struct sway_container *container, -- cgit v1.2.3