Adding float border color patch
This commit is contained in:
@ -55,14 +55,14 @@ horizgrid(Monitor *m) {
|
||||
int ntop, nbottom = 0;
|
||||
|
||||
/* Count windows */
|
||||
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
|
||||
if(n == 0)
|
||||
if (n == 0)
|
||||
return;
|
||||
else if(n == 1) { /* Just fill the whole screen */
|
||||
else if (n == 1) { /* Just fill the whole screen */
|
||||
c = nexttiled(m->clients);
|
||||
resize(c, m->wx, m->wy, m->ww - (2*c->bw), m->wh - (2*c->bw), False);
|
||||
} else if(n == 2) { /* Split vertically */
|
||||
} else if (n == 2) { /* Split vertically */
|
||||
w = m->ww / 2;
|
||||
c = nexttiled(m->clients);
|
||||
resize(c, m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False);
|
||||
@ -71,12 +71,12 @@ horizgrid(Monitor *m) {
|
||||
} else {
|
||||
ntop = n / 2;
|
||||
nbottom = n - ntop;
|
||||
for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||
if(i < ntop)
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||
if (i < ntop)
|
||||
resize(c, m->wx + i * m->ww / ntop, m->wy, m->ww / ntop - (2*c->bw), m->wh / 2 - (2*c->bw), False);
|
||||
else
|
||||
resize(c, m->wx + (i - ntop) * m->ww / nbottom, m->wy + m->wh / 2, m->ww / nbottom - (2*c->bw), m->wh / 2 - (2*c->bw), False);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user