[fix] scale check to prevent un-necessary layouts was in the wrong place.

master
wil 8 years ago
parent d99efb5f6f
commit f7269684d0

@ -1031,11 +1031,11 @@ void apply_horiz_layout(swayc_t *container, const double x, const double y,
} }
scale += *old_width; scale += *old_width;
} }
scale = width / scale;
// Resize windows // Resize windows
double child_x = x; double child_x = x;
if (scale > 0.1) { if (scale > 0.1) {
scale = width / scale;
sway_log(L_DEBUG, "Arranging %p horizontally", container); sway_log(L_DEBUG, "Arranging %p horizontally", container);
swayc_t *focused = NULL; swayc_t *focused = NULL;
for (int i = start; i < end; ++i) { 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 += *old_height;
} }
scale = height / scale;
// Resize // Resize
double child_y = y; double child_y = y;
if (scale > 0.1) { if (scale > 0.1) {
scale = height / scale;
sway_log(L_DEBUG, "Arranging %p vertically", container); sway_log(L_DEBUG, "Arranging %p vertically", container);
swayc_t *focused = NULL; swayc_t *focused = NULL;
for (i = start; i < end; ++i) { for (i = start; i < end; ++i) {

Loading…
Cancel
Save