aewl

diff tag.c @ 124:75576e44c1d8

made status bar drawing more robust, implemented togglemax and togglemode, works quite well
author arg@10ksloc.org
date Thu, 20 Jul 2006 15:07:35 +0200
parents 61490330e90a
children b4b8b4236599
line diff
     1.1 --- a/tag.c	Thu Jul 20 12:18:06 2006 +0200
     1.2 +++ b/tag.c	Thu Jul 20 15:07:35 2006 +0200
     1.3 @@ -51,8 +51,8 @@
     1.4  {
     1.5  	Client *c;
     1.6  
     1.7 -	arrange = dofloat;
     1.8  	for(c = clients; c; c = c->next) {
     1.9 +		c->ismax = False;
    1.10  		if(c->tags[tsel]) {
    1.11  			resize(c, True, TopLeft);
    1.12  		}
    1.13 @@ -75,7 +75,6 @@
    1.14  	Client *c;
    1.15  
    1.16  	w = sw - mw;
    1.17 -	arrange = dotile;
    1.18  	for(n = 0, c = clients; c; c = c->next)
    1.19  		if(c->tags[tsel] && !c->isfloat)
    1.20  			n++;
    1.21 @@ -86,6 +85,7 @@
    1.22  		h = sh - bh;
    1.23  
    1.24  	for(i = 0, c = clients; c; c = c->next) {
    1.25 +		c->ismax = False;
    1.26  		if(c->tags[tsel]) {
    1.27  			if(c->isfloat) {
    1.28  				higher(c);
    1.29 @@ -213,6 +213,13 @@
    1.30  }
    1.31  
    1.32  void
    1.33 +togglemode(Arg *arg)
    1.34 +{
    1.35 +	arrange = arrange == dofloat ? dotile : dofloat;
    1.36 +	arrange(NULL);
    1.37 +}
    1.38 +
    1.39 +void
    1.40  view(Arg *arg)
    1.41  {
    1.42  	tsel = arg->i;