summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/montage/montage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c
index ce29d61..f064e5c 100644
--- a/src/modules/montage/montage.c
+++ b/src/modules/montage/montage.c
@@ -159,8 +159,8 @@ static int montage_fragmenter(void *context, const fb_fragment_t *fragment, unsi
{
montage_context_t *ctxt = context;
float root = sqrtf(ctxt->n_modules);
- unsigned tile_width = fragment->frame_width / ceilf(root); /* screens are wide, give excess to the width */
- unsigned tile_height = fragment->frame_height / floorf(root); /* take from the height */
+ unsigned tile_width = fragment->frame_width / ceilf(root); /* screens are wide, always give excess to the width */
+ unsigned tile_height = fragment->frame_height / rintf(root); /* only give to the height when fraction is >= .5f */
int ret;
/* XXX: this could all be more clever and make some tiles bigger than others to deal with fractional square roots,
© All Rights Reserved