Mercurial > aewl
comparison tag.c @ 393:6786cd59468f
applied sanders patch to remove unnecessary commit()
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Thu, 31 Aug 2006 08:48:04 +0200 |
parents | 126e78129f1d |
children | 761d0cd6e504 |
comparison
equal
deleted
inserted
replaced
392:278277287de6 | 393:6786cd59468f |
---|---|
27 TAGS | 27 TAGS |
28 RULES | 28 RULES |
29 | 29 |
30 static RReg *rreg = NULL; | 30 static RReg *rreg = NULL; |
31 static unsigned int len = 0; | 31 static unsigned int len = 0; |
32 | |
33 static void | |
34 commit() | |
35 { | |
36 /* asserts sel != NULL */ | |
37 settitle(sel); | |
38 if(!isvisible(sel)) | |
39 arrange(NULL); | |
40 else | |
41 drawstatus(); | |
42 } | |
43 | 32 |
44 /* extern */ | 33 /* extern */ |
45 | 34 |
46 Client * | 35 Client * |
47 getnext(Client *c) | 36 getnext(Client *c) |
130 return; | 119 return; |
131 | 120 |
132 for(i = 0; i < ntags; i++) | 121 for(i = 0; i < ntags; i++) |
133 sel->tags[i] = False; | 122 sel->tags[i] = False; |
134 sel->tags[arg->i] = True; | 123 sel->tags[arg->i] = True; |
135 commit(); | 124 arrange(NULL); |
136 } | 125 } |
137 | 126 |
138 void | 127 void |
139 toggletag(Arg *arg) | 128 toggletag(Arg *arg) |
140 { | 129 { |
145 | 134 |
146 sel->tags[arg->i] = !sel->tags[arg->i]; | 135 sel->tags[arg->i] = !sel->tags[arg->i]; |
147 for(i = 0; i < ntags && !sel->tags[i]; i++); | 136 for(i = 0; i < ntags && !sel->tags[i]; i++); |
148 if(i == ntags) | 137 if(i == ntags) |
149 sel->tags[arg->i] = True; | 138 sel->tags[arg->i] = True; |
150 commit(); | 139 arrange(NULL); |
151 } | 140 } |