Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
c619363
)
applied dme's patch to prevent changing prevtags if nothing actually changed
author
Anselm R Garbe <
[email protected]
>
Mon, 11 Feb 2008 20:48:22 +0000
(20:48 +0000)
committer
Anselm R Garbe <
[email protected]
>
Mon, 11 Feb 2008 20:48:22 +0000
(20:48 +0000)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
699aed1
..
020adb3
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-1976,14
+1976,17
@@
xerrorstart(Display *dsply, XErrorEvent *ee) {
void
view(const char *arg) {
unsigned int i;
void
view(const char *arg) {
unsigned int i;
-
+ Bool tmp[LENGTH(tags)];
Monitor *m = &monitors[monitorat()];
Monitor *m = &monitors[monitorat()];
- memcpy(m->prevtags, m->seltags, sizeof initags);
for(i = 0; i < LENGTH(tags); i++)
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
}
void