pinosaur
/
dwm.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfd6079
)
simplification of view() as proposed by anydot
author
Anselm R Garbe
<garbeam@gmail.com>
Sun, 27 Apr 2008 17:36:11 +0000
(18:36 +0100)
committer
Anselm R Garbe
<garbeam@gmail.com>
Sun, 27 Apr 2008 17:36:11 +0000
(18:36 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
3717b90
..
ee0c810
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-1828,16
+1828,9
@@
updatewmhints(Client *c) {
void
view(const char *arg) {
- Bool tmp[LENGTH(tags)];
- unsigned int i;
-
- for(i = 0; i < LENGTH(tags); i++)
- tmp[i] = (NULL == arg);
- tmp[idxoftag(arg)] = True;
-
- seltags ^= 1; /* toggle sel tagset */
- if(memcmp(tagset[seltags ^ 1], tmp, TAGSZ) != 0)
- memcpy(tagset[seltags], tmp, TAGSZ);
+ seltags ^= 1;
+ memset(tagset[seltags], (NULL == arg), TAGSZ);
+ tagset[seltags][idxoftag(arg)] = True;
arrange();
}