diff options
| author | bakkeby <[email protected]> | 2019-09-09 21:35:19 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2019-09-09 21:35:19 +0200 |
| commit | 637cc50ddafc5aedc24ebfc5498cfec38cb22cc0 (patch) | |
| tree | 15360754e45d3260f0afd35fbfb9ef6e580f130a /patch/cfacts.c | |
| parent | 973d64f51be939daa50d85151262d8602e09e978 (diff) | |
| download | dwm-flexipatch-637cc50ddafc5aedc24ebfc5498cfec38cb22cc0.tar.gz dwm-flexipatch-637cc50ddafc5aedc24ebfc5498cfec38cb22cc0.zip | |
Adding centered master patches
Diffstat (limited to 'patch/cfacts.c')
| -rw-r--r-- | patch/cfacts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c index b193c92..b06098a 100644 --- a/patch/cfacts.c +++ b/patch/cfacts.c @@ -1,5 +1,6 @@ void -setcfact(const Arg *arg) { +setcfact(const Arg *arg) +{ float f; Client *c; @@ -19,10 +20,11 @@ setcfact(const Arg *arg) { void getfacts(Monitor *m, float *mf, float *sf) { + unsigned int n; float mfacts = 0, sfacts = 0; Client *c; - for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) { + for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) { if (!m->nmaster || n < m->nmaster) mfacts += c->cfact; else |
