aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorS. Christoffer Eliesen <christoffer@eliesen.no>2015-10-27 15:58:39 +0100
committerS. Christoffer Eliesen <christoffer@eliesen.no>2015-10-28 20:06:48 +0100
commitfede354a3dfd3309ee068b7eef537b74c2721e2d (patch)
tree73b980ee83881b1777920284b74664b61dca1bb5 /sway
parentfa9978ee848a9387a3c3f7eb1017f91f5f77f032 (diff)
layout: Don't reset container size if it's a floating window.
Diffstat (limited to 'sway')
-rw-r--r--sway/layout.c7
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) {
return;
}
swayc_t *parent = remove_child(container);
- // reset container geometry
- container->width = container->height = 0;
-
// Send to new destination
if (container->is_floating) {
add_floating(swayc_active_workspace_for(destination), container);
} else if (destination->type == C_WORKSPACE) {
+ // reset container geometry
+ container->width = container->height = 0;
add_child(destination, container);
} else {
+ // reset container geometry
+ container->width = container->height = 0;
add_sibling(destination, container);
}
// Destroy old container if we need to