Layouts - re-distributing remaining pixels after even split to address #12

This commit is contained in:
bakkeby
2020-03-20 15:20:07 +01:00
parent 143f94cbc2
commit 8047fe257b
13 changed files with 410 additions and 940 deletions

View File

@ -15,23 +15,4 @@ setcfact(const Arg *arg)
return;
c->cfact = f;
arrange(selmon);
}
#if BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || TILE_LAYOUT
void
getfacts(Monitor *m, float *mf, float *sf)
{
unsigned int n;
float mfacts = 0, sfacts = 0;
Client *c;
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
if (m->nmaster && n < m->nmaster)
mfacts += c->cfact;
else
sfacts += c->cfact;
}
*mf = mfacts; // total factor of master area
*sf = sfacts; // total factor of slave area
}
#endif
}