summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-04-27 18:36:11 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-04-27 18:36:11 +0100
commitc094ed24735b8bac3c6c7773c76e608cdf3f3354 (patch)
tree9286cef0744bd4a737bfe1510014d952ba9321ee
parentapplied yiyus tagset patch (diff)
downloaddwm-c094ed24735b8bac3c6c7773c76e608cdf3f3354.tar.gz
dwm-c094ed24735b8bac3c6c7773c76e608cdf3f3354.zip
simplification of view() as proposed by anydot
Diffstat (limited to '')
-rw-r--r--dwm.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/dwm.c b/dwm.c
index 3717b90..ee0c810 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1828,16 +1828,9 @@ updatewmhints(Client *c) {
1828 1828
1829void 1829void
1830view(const char *arg) { 1830view(const char *arg) {
1831 Bool tmp[LENGTH(tags)]; 1831 seltags ^= 1;
1832 unsigned int i; 1832 memset(tagset[seltags], (NULL == arg), TAGSZ);
1833 1833 tagset[seltags][idxoftag(arg)] = True;
1834 for(i = 0; i < LENGTH(tags); i++)
1835 tmp[i] = (NULL == arg);
1836 tmp[idxoftag(arg)] = True;
1837
1838 seltags ^= 1; /* toggle sel tagset */
1839 if(memcmp(tagset[seltags ^ 1], tmp, TAGSZ) != 0)
1840 memcpy(tagset[seltags], tmp, TAGSZ);
1841 arrange(); 1834 arrange();
1842} 1835}
1843 1836