diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-11-10 19:31:01 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-11-10 19:31:01 +0100 |
| commit | 667da18b31e09c7c6d9359b66ff8e2ded7b20365 (patch) | |
| tree | 527a3408f4a1fa8073da05661f0f460fec529969 | |
| parent | Using a new tags definition (const char [][MAXTAGLEN] - thanks go to Szabolcs! (diff) | |
| download | dwm-667da18b31e09c7c6d9359b66ff8e2ded7b20365.tar.gz dwm-667da18b31e09c7c6d9359b66ff8e2ded7b20365.zip | |
initialize prevtags in setup, now users can setup which seltags should be selectedin config.h
| -rw-r--r-- | dwm.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -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 | ||
| 236 | Bool prevtags[LENGTH(tags)] = {[0] = True}; | 236 | Bool prevtags[LENGTH(tags)]; |
| 237 | 237 | ||
| 238 | /* function implementations */ | 238 | /* function implementations */ |
| 239 | void | 239 | void |
| @@ -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 | ||
| 1850 | void | 1851 | void |
| 1851 | viewprevtag(const char *arg) { | 1852 | viewprevtag(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 | ||
