From 3a7ea6f5751b3aae2dd1737c8cd6810e02c215b7 Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 4 Dec 2022 22:30:10 +0100 Subject: [PATCH] remove getfacts() from cfacts, doesn't seem to be necessary --- speedwm.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/speedwm.c b/speedwm.c index 39a2ca7..86142ec 100644 --- a/speedwm.c +++ b/speedwm.c @@ -403,7 +403,6 @@ typedef struct { /* function declarations */ static void applyrules(Client *c); static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc); -static void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr); static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); static void inplacerotate(const Arg *arg); static void togglesticky(const Arg *arg); @@ -1832,30 +1831,6 @@ detach(Client *c) *tc = c->next; } -void -getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr) -{ - unsigned int n; - float mfacts, sfacts; - int mtotal = 0, stotal = 0; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - mfacts = MIN(n, m->mastercount); - sfacts = n - m->mastercount; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) - if (n < m->mastercount) - mtotal += msize / mfacts; - else - stotal += ssize / sfacts; - - *mf = mfacts; /* total factor of master area */ - *sf = sfacts; /* total factor of stack area */ - *mr = msize - mtotal; /* the remainder (rest) of pixels after an even master split */ - *sr = ssize - stotal; /* the remainder (rest) of pixels after an even stack split */ -} - void detachstack(Client *c) {