diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-10-27 15:58:39 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-10-28 20:06:48 +0100 |
commit | fede354a3dfd3309ee068b7eef537b74c2721e2d (patch) | |
tree | 73b980ee83881b1777920284b74664b61dca1bb5 | |
parent | Merge pull request #209 from sce/fix_seamless_mouse (diff) | |
download | sway-fede354a3dfd3309ee068b7eef537b74c2721e2d.tar.gz sway-fede354a3dfd3309ee068b7eef537b74c2721e2d.tar.zst sway-fede354a3dfd3309ee068b7eef537b74c2721e2d.zip |
layout: Don't reset container size if it's a floating window.
-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 |