summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2017-01-07 18:15:42 +0100
committerFurkan Sahin <furkan-dev@proton.me>2017-01-07 18:15:42 +0100
commitd2c542ddcbd7637191716d3ec29bf21bdd57bf3f (patch)
tree20f358a3fa7638de7df9372550937fe23780bbf6
parent8279f46c6a43b5da50301f8fed7b63a16530c25a (diff)
[fix] scale check to prevent un-necessary layouts was in the wrong place.
-rw-r--r--sway/layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 9661f505..78673cf9 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -1031,11 +1031,11 @@ void apply_horiz_layout(swayc_t *container, const double x, const double y,
}
scale += *old_width;
}
+ scale = width / scale;
// Resize windows
double child_x = x;
if (scale > 0.1) {
- scale = width / scale;
sway_log(L_DEBUG, "Arranging %p horizontally", container);
swayc_t *focused = NULL;
for (int i = start; i < end; ++i) {
@@ -1084,10 +1084,11 @@ void apply_vert_layout(swayc_t *container, const double x, const double y,
}
scale += *old_height;
}
+ scale = height / scale;
+
// Resize
double child_y = y;
if (scale > 0.1) {
- scale = height / scale;
sway_log(L_DEBUG, "Arranging %p vertically", container);
swayc_t *focused = NULL;
for (i = start; i < end; ++i) {