aboutsummaryrefslogtreecommitdiffstats
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
parente9a07335060337222c94260797582aae2c74d455 (diff)
downloaddwm-667da18b31e09c7c6d9359b66ff8e2ded7b20365.tar.gz
initialize prevtags in setup, now users can setup which seltags should be selectedin config.h
Diffstat (limited to 'dwm.c')
-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;
/* configuration, allows nested code to access above variables */
#include "config.h"
-Bool prevtags[LENGTH(tags)] = {[0] = True};
+Bool prevtags[LENGTH(tags)];
/* function implementations */
void
@@ -1467,6 +1467,7 @@ setup(void) {
grabkeys();
/* init tags */
+ memcpy(prevtags, seltags, sizeof seltags);
compileregs();
/* init appearance */
@@ -1849,11 +1850,11 @@ view(const char *arg) {
void
viewprevtag(const char *arg) {
- static Bool tmptags[sizeof tags / sizeof tags[0]];
+ static Bool tmp[LENGTH(tags)];
- memcpy(tmptags, seltags, sizeof seltags);
+ memcpy(tmp, seltags, sizeof seltags);
memcpy(seltags, prevtags, sizeof seltags);
- memcpy(prevtags, tmptags, sizeof seltags);
+ memcpy(prevtags, tmp, sizeof seltags);
arrange();
}