summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/dwm.c b/dwm.c
index 699aed1..020adb3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1976,14 +1976,17 @@ xerrorstart(Display *dsply, XErrorEvent *ee) {
1976void 1976void
1977view(const char *arg) { 1977view(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
1989void 1992void