diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c index 6388a9b2..29772172 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -289,15 +289,16 @@ void move_container_to(swayc_t* container, swayc_t* destination) { | |||
289 | return; | 289 | return; |
290 | } | 290 | } |
291 | swayc_t *parent = remove_child(container); | 291 | swayc_t *parent = remove_child(container); |
292 | // reset container geometry | ||
293 | container->width = container->height = 0; | ||
294 | |||
295 | // Send to new destination | 292 | // Send to new destination |
296 | if (container->is_floating) { | 293 | if (container->is_floating) { |
297 | add_floating(swayc_active_workspace_for(destination), container); | 294 | add_floating(swayc_active_workspace_for(destination), container); |
298 | } else if (destination->type == C_WORKSPACE) { | 295 | } else if (destination->type == C_WORKSPACE) { |
296 | // reset container geometry | ||
297 | container->width = container->height = 0; | ||
299 | add_child(destination, container); | 298 | add_child(destination, container); |
300 | } else { | 299 | } else { |
300 | // reset container geometry | ||
301 | container->width = container->height = 0; | ||
301 | add_sibling(destination, container); | 302 | add_sibling(destination, container); |
302 | } | 303 | } |
303 | // Destroy old container if we need to | 304 | // Destroy old container if we need to |