summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-11-10 19:31:01 +0100
committerAnselm R. Garbe <garbeam@gmail.com>2007-11-10 19:31:01 +0100
commit667da18b31e09c7c6d9359b66ff8e2ded7b20365 (patch)
tree527a3408f4a1fa8073da05661f0f460fec529969 /dwm.c
parentUsing a new tags definition (const char [][MAXTAGLEN] - thanks go to Szabolcs! (diff)
downloaddwm-667da18b31e09c7c6d9359b66ff8e2ded7b20365.tar.gz
dwm-667da18b31e09c7c6d9359b66ff8e2ded7b20365.zip
initialize prevtags in setup, now users can setup which seltags should be selectedin config.h
Diffstat (limited to '')
-rw-r--r--dwm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index bd7ffe3..8da3b6f 100644
--- a/dwm.c
+++ b/dwm.c
@@ -233,7 +233,7 @@ Regs *regs = NULL;
233/* configuration, allows nested code to access above variables */ 233/* configuration, allows nested code to access above variables */
234#include "config.h" 234#include "config.h"
235 235
236Bool prevtags[LENGTH(tags)] = {[0] = True}; 236Bool prevtags[LENGTH(tags)];
237 237
238/* function implementations */ 238/* function implementations */
239void 239void
@@ -1467,6 +1467,7 @@ setup(void) {
1467 grabkeys(); 1467 grabkeys();
1468 1468
1469 /* init tags */ 1469 /* init tags */
1470 memcpy(prevtags, seltags, sizeof seltags);
1470 compileregs(); 1471 compileregs();
1471 1472
1472 /* init appearance */ 1473 /* init appearance */
@@ -1849,11 +1850,11 @@ view(const char *arg) {
1849 1850
1850void 1851void
1851viewprevtag(const char *arg) { 1852viewprevtag(const char *arg) {
1852 static Bool tmptags[sizeof tags / sizeof tags[0]]; 1853 static Bool tmp[LENGTH(tags)];
1853 1854
1854 memcpy(tmptags, seltags, sizeof seltags); 1855 memcpy(tmp, seltags, sizeof seltags);
1855 memcpy(seltags, prevtags, sizeof seltags); 1856 memcpy(seltags, prevtags, sizeof seltags);
1856 memcpy(prevtags, tmptags, sizeof seltags); 1857 memcpy(prevtags, tmp, sizeof seltags);
1857 arrange(); 1858 arrange();
1858} 1859}
1859 1860