diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-02-11 20:48:22 +0000 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-02-11 20:48:22 +0000 |
| commit | 4adfdc9d95b2ec6603deab153697e2296e3c9c97 (patch) | |
| tree | 9a1bec9ea2b079ef0e2210a7e2834ceb40e0507f | |
| parent | applied dwm-4.8-snaptileds.diff (diff) | |
| download | dwm-4adfdc9d95b2ec6603deab153697e2296e3c9c97.tar.gz dwm-4adfdc9d95b2ec6603deab153697e2296e3c9c97.zip | |
applied dme's patch to prevent changing prevtags if nothing actually changed
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 13 |
1 files changed, 8 insertions, 5 deletions
| @@ -1976,14 +1976,17 @@ xerrorstart(Display *dsply, XErrorEvent *ee) { | |||
| 1976 | void | 1976 | void |
| 1977 | view(const char *arg) { | 1977 | view(const char *arg) { |
| 1978 | unsigned int i; | 1978 | unsigned int i; |
| 1979 | 1979 | Bool tmp[LENGTH(tags)]; | |
| 1980 | Monitor *m = &monitors[monitorat()]; | 1980 | Monitor *m = &monitors[monitorat()]; |
| 1981 | 1981 | ||
| 1982 | memcpy(m->prevtags, m->seltags, sizeof initags); | ||
| 1983 | for(i = 0; i < LENGTH(tags); i++) | 1982 | for(i = 0; i < LENGTH(tags); i++) |
| 1984 | m->seltags[i] = (NULL == arg); | 1983 | tmp[i] = (NULL == arg); |
| 1985 | m->seltags[idxoftag(arg)] = True; | 1984 | tmp[idxoftag(arg)] = True; |
| 1986 | arrange(); | 1985 | if(memcmp(m->seltags, tmp, sizeof initags) != 0) { |
| 1986 | memcpy(m->prevtags, m->seltags, sizeof initags); | ||
| 1987 | memcpy(m->seltags, tmp, sizeof initags); | ||
| 1988 | arrange(); | ||
| 1989 | } | ||
| 1987 | } | 1990 | } |
| 1988 | 1991 | ||
| 1989 | void | 1992 | void |
