From 4e7ef1dd39ae4ceadba0ffb1e8c6f9c60f43afda Mon Sep 17 00:00:00 2001 From: vilhalmer Date: Mon, 9 Jul 2018 08:26:39 -0400 Subject: No need to walk to workspace, recursive will --- sway/tree/layout.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sway/tree/layout.c') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index fce8ba42..0dba4aab 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -192,10 +192,7 @@ void container_move_to(struct sway_container *container, seat_set_focus(seat, ws); } - // Remove an empty workspace from the destination output. - if (new_parent_focus->type != C_WORKSPACE) { - new_parent_focus = container_parent(new_parent_focus, C_WORKSPACE); - } + // Try to remove an empty workspace from the destination output. container_reap_empty_recursive(new_parent_focus); container_sort_workspaces(new_parent); -- cgit v1.2.3-54-g00ecf