From 9bc39c02b27a9ecc0bfe17bd1f917c31b07b95a2 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Sat, 21 Mar 2020 14:23:27 +0100 Subject: [PATCH] Fixing bugs in relation to #12 --- patch/centeredfloatingmaster.c | 4 ++-- patch/centeredmaster.c | 4 ++-- patch/flextile-deluxe.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patch/centeredfloatingmaster.c b/patch/centeredfloatingmaster.c index e052c24..4ceedeb 100644 --- a/patch/centeredfloatingmaster.c +++ b/patch/centeredfloatingmaster.c @@ -83,9 +83,9 @@ centeredfloatingmaster(Monitor *m) } else { /* stack clients are stacked horizontally */ #if CFACTS_PATCH - resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0); + resize(c, sx, sy, (sw / sfacts) * c->cfact + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0); #else - resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0); + resize(c, sx, sy, (sw / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0); #endif // CFACTS_PATCH #if VANITYGAPS_PATCH sx += WIDTH(c) + iv; diff --git a/patch/centeredmaster.c b/patch/centeredmaster.c index 384a7eb..a72eb07 100644 --- a/patch/centeredmaster.c +++ b/patch/centeredmaster.c @@ -107,9 +107,9 @@ centeredmaster(Monitor *m) if (!m->nmaster || n < m->nmaster) mtotal += mh / mfacts; else if ((n - m->nmaster) % 2) - ltotal += lh / sfacts; + ltotal += lh / lfacts; else - rtotal += rh / lfacts; + rtotal += rh / rfacts; #endif // CFACTS_PATCH mrest = mh - mtotal; diff --git a/patch/flextile-deluxe.c b/patch/flextile-deluxe.c index e5aa88b..f336e27 100644 --- a/patch/flextile-deluxe.c +++ b/patch/flextile-deluxe.c @@ -57,7 +57,7 @@ getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact) #if CFACTS_PATCH total += size * (c->cfact / facts); #else - total += size / sfacts; + total += size / facts; #endif // CFACTS_PATCH *rest = size - total;