diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-04-27 18:36:11 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-04-27 18:36:11 +0100 |
| commit | c094ed24735b8bac3c6c7773c76e608cdf3f3354 (patch) | |
| tree | 9286cef0744bd4a737bfe1510014d952ba9321ee | |
| parent | applied yiyus tagset patch (diff) | |
| download | dwm-c094ed24735b8bac3c6c7773c76e608cdf3f3354.tar.gz dwm-c094ed24735b8bac3c6c7773c76e608cdf3f3354.zip | |
simplification of view() as proposed by anydot
| -rw-r--r-- | dwm.c | 13 |
1 files changed, 3 insertions, 10 deletions
| @@ -1828,16 +1828,9 @@ updatewmhints(Client *c) { | |||
| 1828 | 1828 | ||
| 1829 | void | 1829 | void |
| 1830 | view(const char *arg) { | 1830 | view(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 | ||
