summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dwm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwm.c b/dwm.c
index 277f561..50f4ea0 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1569,7 +1569,7 @@ textw(const char *text) {
1569void 1569void
1570tile(void) { 1570tile(void) {
1571 unsigned int i, n, nx, ny, nw, nh, mw, th; 1571 unsigned int i, n, nx, ny, nw, nh, mw, th;
1572 Client *c; 1572 Client *c, *mc;
1573 1573
1574 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) 1574 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
1575 n++; 1575 n++;
@@ -1582,7 +1582,8 @@ tile(void) {
1582 1582
1583 nx = wax; 1583 nx = wax;
1584 ny = way; 1584 ny = way;
1585 for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++) { 1585 nw = 0; /* gcc stupidity requires this */
1586 for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
1586 c->ismax = False; 1587 c->ismax = False;
1587 if(i == 0) { /* master */ 1588 if(i == 0) { /* master */
1588 nw = mw - 2 * c->border; 1589 nw = mw - 2 * c->border;
@@ -1591,9 +1592,9 @@ tile(void) {
1591 else { /* tile window */ 1592 else { /* tile window */
1592 if(i == 1) { 1593 if(i == 1) {
1593 ny = way; 1594 ny = way;
1594 nx += mw; 1595 nx += mc->w + 2 * mc->border;
1596 nw = waw - nx - 2 * c->border;
1595 } 1597 }
1596 nw = waw - mw - 2 * c->border;
1597 if(i + 1 == n) /* remainder */ 1598 if(i + 1 == n) /* remainder */
1598 nh = (way + wah) - ny - 2 * c->border; 1599 nh = (way + wah) - ny - 2 * c->border;
1599 else 1600 else
@@ -1601,7 +1602,7 @@ tile(void) {
1601 } 1602 }
1602 resize(c, nx, ny, nw, nh, RESIZEHINTS); 1603 resize(c, nx, ny, nw, nh, RESIZEHINTS);
1603 if(n > 1 && th != wah) 1604 if(n > 1 && th != wah)
1604 ny += nh + 2 * c->border; 1605 ny = c->y + c->h + 2 * c->border;
1605 } 1606 }
1606} 1607}
1607 1608