applied dme's patch to prevent changing prevtags if nothing actually changed - dwm - dynamic window manager HTML git clone https://git.parazyd.org/dwm DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 4adfdc9d95b2ec6603deab153697e2296e3c9c97 DIR parent c619363d1580d5913b00d8b7d0415da5917b8060 HTML Author: Anselm R Garbe <garbeam@gmail.com> Date: Mon, 11 Feb 2008 20:48:22 +0000 applied dme's patch to prevent changing prevtags if nothing actually changed Diffstat: M dwm.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- DIR diff --git a/dwm.c b/dwm.c @@ -1976,14 +1976,17 @@ xerrorstart(Display *dsply, XErrorEvent *ee) { void view(const char *arg) { unsigned int i; - + Bool tmp[LENGTH(tags)]; Monitor *m = &monitors[monitorat()]; - memcpy(m->prevtags, m->seltags, sizeof initags); for(i = 0; i < LENGTH(tags); i++) - m->seltags[i] = (NULL == arg); - m->seltags[idxoftag(arg)] = True; - arrange(); + tmp[i] = (NULL == arg); + tmp[idxoftag(arg)] = True; + if(memcmp(m->seltags, tmp, sizeof initags) != 0) { + memcpy(m->prevtags, m->seltags, sizeof initags); + memcpy(m->seltags, tmp, sizeof initags); + arrange(); + } } void