summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar wil <william.barsse@gmail.com>2017-01-07 18:15:42 +0100
committerLibravatar wil <william.barsse@gmail.com>2017-01-07 18:15:42 +0100
commitf7269684d018658c508f82529f5ca24c02dfd227 (patch)
tree20f358a3fa7638de7df9372550937fe23780bbf6 /sway
parent[fix] corner cases win nb_children < nb_master|nb_col (diff)
downloadsway-f7269684d018658c508f82529f5ca24c02dfd227.tar.gz
sway-f7269684d018658c508f82529f5ca24c02dfd227.tar.zst
sway-f7269684d018658c508f82529f5ca24c02dfd227.zip
[fix] scale check to prevent un-necessary layouts was in the wrong place.
Diffstat (limited to 'sway')
-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,
1031 } 1031 }
1032 scale += *old_width; 1032 scale += *old_width;
1033 } 1033 }
1034 scale = width / scale;
1034 1035
1035 // Resize windows 1036 // Resize windows
1036 double child_x = x; 1037 double child_x = x;
1037 if (scale > 0.1) { 1038 if (scale > 0.1) {
1038 scale = width / scale;
1039 sway_log(L_DEBUG, "Arranging %p horizontally", container); 1039 sway_log(L_DEBUG, "Arranging %p horizontally", container);
1040 swayc_t *focused = NULL; 1040 swayc_t *focused = NULL;
1041 for (int i = start; i < end; ++i) { 1041 for (int i = start; i < end; ++i) {
@@ -1084,10 +1084,11 @@ void apply_vert_layout(swayc_t *container, const double x, const double y,
1084 } 1084 }
1085 scale += *old_height; 1085 scale += *old_height;
1086 } 1086 }
1087 scale = height / scale;
1088
1087 // Resize 1089 // Resize
1088 double child_y = y; 1090 double child_y = y;
1089 if (scale > 0.1) { 1091 if (scale > 0.1) {
1090 scale = height / scale;
1091 sway_log(L_DEBUG, "Arranging %p vertically", container); 1092 sway_log(L_DEBUG, "Arranging %p vertically", container);
1092 swayc_t *focused = NULL; 1093 swayc_t *focused = NULL;
1093 for (i = start; i < end; ++i) { 1094 for (i = start; i < end; ++i) {