Skip to content

Commit

Permalink
Fix a bug with minimized clients in tile layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Feb 2, 2008
1 parent 168076c commit 46600bb
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,28 @@ tile(void) {
nw = mw;
nh = (n - 1 > m) ? wah : wah - m;
} else { /* tile window */
if(i == 1) {
if(n - 1 > m){
if(!c->minimized){
if(i == 1) {
ny = way;
nx += mw;
nw = waw - mw;
} else
ny = way + wah - m;
if(!c->minimized){
mvvline(ny, nx, ACS_VLINE, wah);
mvaddch(ny, nx, ACS_TTEE);
nx++, nw--;
}
} else if(!c->minimized || nm > 1)
mvaddch(ny, nx - 1, ACS_LTEE);
if(m == 0 && i + 1 == n) /* no minimized clients */
nh = (way + wah) - ny;
else if(i == nm - 1) /* last not minimized client */
nh = (way + wah - (n - i - 1)) - ny;
else
nh = th;

if(c->minimized)
/* remainder */
if(m == 0 && i + 1 == n) /* no minimized clients */
nh = (way + wah) - ny;
else if(i == nm - 1) /* last not minimized client */
nh = (way + wah - (n - i - 1)) - ny;
else
nh = th;
} else {
nh = 1;
ny = way + wah - (n - i);
}
if(i > 1 && nm > 1)
mvaddch(ny, nx - 1, ACS_LTEE);
}
resize(c,nx,ny,nw,nh);
if(n > 1 && th != wah)
Expand Down

0 comments on commit 46600bb

Please sign in to comment.