diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/move.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index cdbad13e..5851520e 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -208,9 +208,13 @@ static void container_move_to_workspace(struct sway_container *container, | |||
208 | } | 208 | } |
209 | } else { | 209 | } else { |
210 | container_detach(container); | 210 | container_detach(container); |
211 | container->width = container->height = 0; | 211 | if (workspace_is_empty(workspace) && container->children) { |
212 | container->width_fraction = container->height_fraction = 0; | 212 | workspace_unwrap_children(workspace, container); |
213 | workspace_add_tiling(workspace, container); | 213 | } else { |
214 | container->width = container->height = 0; | ||
215 | container->width_fraction = container->height_fraction = 0; | ||
216 | workspace_add_tiling(workspace, container); | ||
217 | } | ||
214 | container_update_representation(container); | 218 | container_update_representation(container); |
215 | } | 219 | } |
216 | if (container->view) { | 220 | if (container->view) { |