diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-09-27 20:08:21 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-09-27 20:08:21 +0200 |
| commit | 3f3086f8b87aed5bf443c8fbcbe32e052fc9c17d (patch) | |
| tree | c38c746832a66ea6f098ea4d44dfa0b43778720d /dwm.c | |
| parent | fixed colors (diff) | |
| download | dwm-3f3086f8b87aed5bf443c8fbcbe32e052fc9c17d.tar.gz dwm-3f3086f8b87aed5bf443c8fbcbe32e052fc9c17d.zip | |
improved tile() for the RESIZEHINTS == True case, now more space is consumed by the clients (esp. if those clients use increment handling heavily)
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -1569,7 +1569,7 @@ textw(const char *text) { | |||
| 1569 | void | 1569 | void |
| 1570 | tile(void) { | 1570 | tile(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 | ||
