diff options
author | Luminarys <kizunanohikari@gmail.com> | 2015-08-21 00:17:26 -0500 |
---|---|---|
committer | Luminarys <kizunanohikari@gmail.com> | 2015-08-21 00:17:26 -0500 |
commit | 461da7f87fa970ce4ba1a124e6197554c85d42e5 (patch) | |
tree | 1cd3b9e0ba8a5da11bc14d76bf0f48b4514b9f34 /sway/layout.c | |
parent | Rewrite of resize command to make it more sane (diff) | |
download | sway-461da7f87fa970ce4ba1a124e6197554c85d42e5.tar.gz sway-461da7f87fa970ce4ba1a124e6197554c85d42e5.tar.zst sway-461da7f87fa970ce4ba1a124e6197554c85d42e5.zip |
Added in bspwm like mouse resizing
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c index 50e7b592..12b27987 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -109,7 +109,7 @@ swayc_t *remove_child(swayc_t *child) { | |||
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
112 | void arrange_windows(swayc_t *container, int width, int height) { | 112 | void arrange_windows(swayc_t *container, double width, double height) { |
113 | int i; | 113 | int i; |
114 | if (width == -1 || height == -1) { | 114 | if (width == -1 || height == -1) { |
115 | sway_log(L_DEBUG, "Arranging layout for %p", container); | 115 | sway_log(L_DEBUG, "Arranging layout for %p", container); |
@@ -209,7 +209,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
209 | sway_log(L_DEBUG, "Arranging %p horizontally", container); | 209 | sway_log(L_DEBUG, "Arranging %p horizontally", container); |
210 | for (i = 0; i < container->children->length; ++i) { | 210 | for (i = 0; i < container->children->length; ++i) { |
211 | swayc_t *child = container->children->items[i]; | 211 | swayc_t *child = container->children->items[i]; |
212 | sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %d by %f)", child, child->type, width, scale); | 212 | sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %f by %f)", child, child->type, width, scale); |
213 | child->x = x + container->x; | 213 | child->x = x + container->x; |
214 | child->y = y + container->y; | 214 | child->y = y + container->y; |
215 | arrange_windows(child, child->width * scale, height); | 215 | arrange_windows(child, child->width * scale, height); |
@@ -236,7 +236,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
236 | sway_log(L_DEBUG, "Arranging %p vertically", container); | 236 | sway_log(L_DEBUG, "Arranging %p vertically", container); |
237 | for (i = 0; i < container->children->length; ++i) { | 237 | for (i = 0; i < container->children->length; ++i) { |
238 | swayc_t *child = container->children->items[i]; | 238 | swayc_t *child = container->children->items[i]; |
239 | sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %d by %f)", child, child->type, height, scale); | 239 | sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %f by %f)", child, child->type, height, scale); |
240 | child->x = x + container->x; | 240 | child->x = x + container->x; |
241 | child->y = y + container->y; | 241 | child->y = y + container->y; |
242 | arrange_windows(child, width, child->height * scale); | 242 | arrange_windows(child, width, child->height * scale); |