tsanders toggletag patch is much more elegant - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit eac04882b40595d724f4578b5acec5f22df570e3
(DIR) parent 6499fc4f938eb7e61ab3e25df3904db9c890c693
(HTM) Author: Anselm R. Garbe <arg@10kloc.org>
Date: Tue, 5 Sep 2006 09:37:45 +0200
sanders toggletag patch is much more elegant
Diffstat:
M tag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/tag.c b/tag.c
t@@ -136,6 +136,6 @@ toggletag(Arg *arg)
for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags)
sel->tags[arg->i] = True;
- for(sel->weight = 0; sel->weight < ntags && !sel->tags[sel->weight]; sel->weight++);
+ sel->weight = (i == ntags) ? arg->i : i;
arrange(NULL);
}