diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-15 17:17:16 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-15 17:17:16 -0400 |
commit | 4014b215ebe39ad4b9c624c10f57a3660d5e626d (patch) | |
tree | 02c4cf738d0c79689f4c9544fa60b11141cf0efe /sway/layout.c | |
parent | 976e1b1c7158022d2e88d1d84d5e9e24999c6dd5 (diff) | |
parent | 56814310e0c80ecd9aa8ba93f483f65f5f23fd70 (diff) |
Merge pull request #33 from Luminarys/master
Fixed reloading and arrange_windows
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sway/layout.c b/sway/layout.c index 3fd7f5c1..918da9f0 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -95,15 +95,28 @@ void arrange_windows(swayc_t *container, int width, int height) { child->x = x; child->y = y; arrange_windows(child, -1, -1); - x += child->width; + // Removed for now because wlc works with relative positions + // Addition can be reconsidered once wlc positions are changed + // x += child->width; } return; case C_OUTPUT: container->width = width; container->height = height; - x -= container->x; - y -= container->y; - break; + // These lines make x/y negative and result in stuff glitching out + // Their addition can be reconsidered once wlc positions are changed + // x -= container->x; + // y -= container->y; + for (i = 0; i < container->children->length; ++i) { + swayc_t *child = container->children->items[i]; + sway_log(L_DEBUG, "Arranging workspace #%d", i); + child->x = x; + child->y = y; + child->width = width; + child->height = height; + arrange_windows(child, -1, -1); + } + return; case C_VIEW: { struct wlc_geometry geometry = { |