tag.c
changeset 124 75576e44c1d8
parent 123 61490330e90a
child 125 b4b8b4236599
equal deleted inserted replaced
123:61490330e90a 124:75576e44c1d8
    49 void
    49 void
    50 dofloat(Arg *arg)
    50 dofloat(Arg *arg)
    51 {
    51 {
    52 	Client *c;
    52 	Client *c;
    53 
    53 
    54 	arrange = dofloat;
       
    55 	for(c = clients; c; c = c->next) {
    54 	for(c = clients; c; c = c->next) {
       
    55 		c->ismax = False;
    56 		if(c->tags[tsel]) {
    56 		if(c->tags[tsel]) {
    57 			resize(c, True, TopLeft);
    57 			resize(c, True, TopLeft);
    58 		}
    58 		}
    59 		else
    59 		else
    60 			ban(c);
    60 			ban(c);
    73 {
    73 {
    74 	int n, i, w, h;
    74 	int n, i, w, h;
    75 	Client *c;
    75 	Client *c;
    76 
    76 
    77 	w = sw - mw;
    77 	w = sw - mw;
    78 	arrange = dotile;
       
    79 	for(n = 0, c = clients; c; c = c->next)
    78 	for(n = 0, c = clients; c; c = c->next)
    80 		if(c->tags[tsel] && !c->isfloat)
    79 		if(c->tags[tsel] && !c->isfloat)
    81 			n++;
    80 			n++;
    82 
    81 
    83 	if(n > 1)
    82 	if(n > 1)
    84 		h = (sh - bh) / (n - 1);
    83 		h = (sh - bh) / (n - 1);
    85 	else
    84 	else
    86 		h = sh - bh;
    85 		h = sh - bh;
    87 
    86 
    88 	for(i = 0, c = clients; c; c = c->next) {
    87 	for(i = 0, c = clients; c; c = c->next) {
       
    88 		c->ismax = False;
    89 		if(c->tags[tsel]) {
    89 		if(c->tags[tsel]) {
    90 			if(c->isfloat) {
    90 			if(c->isfloat) {
    91 				higher(c);
    91 				higher(c);
    92 				resize(c, True, TopLeft);
    92 				resize(c, True, TopLeft);
    93 				continue;
    93 				continue;
   211 	if(!matched)
   211 	if(!matched)
   212 		c->tags[tsel] = tags[tsel];
   212 		c->tags[tsel] = tags[tsel];
   213 }
   213 }
   214 
   214 
   215 void
   215 void
       
   216 togglemode(Arg *arg)
       
   217 {
       
   218 	arrange = arrange == dofloat ? dotile : dofloat;
       
   219 	arrange(NULL);
       
   220 }
       
   221 
       
   222 void
   216 view(Arg *arg)
   223 view(Arg *arg)
   217 {
   224 {
   218 	tsel = arg->i;
   225 	tsel = arg->i;
   219 	arrange(NULL);
   226 	arrange(NULL);
   220 	drawall();
   227 	drawall();