Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
308f95a
)
fixed wrong tagging stuff
author
anselm@anselm1 <unknown>
Sat, 22 Dec 2007 12:49:04 +0000
(12:49 +0000)
committer
anselm@anselm1 <unknown>
Sat, 22 Dec 2007 12:49:04 +0000
(12:49 +0000)
config.def.h
patch
|
blob
|
history
dwm.c
patch
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
dedcc61
..
3cb562a
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-13,7
+13,7
@@
/* tagging */
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" };
/* tagging */
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" };
-Bool
sel
tags[LENGTH(tags)] = {[0] = True};
+Bool
ini
tags[LENGTH(tags)] = {[0] = True};
Rule rules[] = {
/* class:instance:title regex tags regex isfloating */
{ "Firefox", "www", False },
Rule rules[] = {
/* class:instance:title regex tags regex isfloating */
{ "Firefox", "www", False },
diff --git
a/dwm.c
b/dwm.c
index
fb6bcb8
..
547218a
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-297,7
+297,7
@@
applyrules(Client *c) {
if(ch.res_name)
XFree(ch.res_name);
if(!matched_tag)
if(ch.res_name)
XFree(ch.res_name);
if(!matched_tag)
- memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof
sel
tags);
+ memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof
ini
tags);
if (!matched_monitor)
c->monitor = monitorat(-1, -1);
}
if (!matched_monitor)
c->monitor = monitorat(-1, -1);
}
@@
-1056,7
+1056,7
@@
manage(Window w, XWindowAttributes *wa) {
XWindowChanges wc;
c = emallocz(sizeof(Client));
XWindowChanges wc;
c = emallocz(sizeof(Client));
- c->tags = emallocz(sizeof
sel
tags);
+ c->tags = emallocz(sizeof
ini
tags);
c->win = w;
applyrules(c);
c->win = w;
applyrules(c);
@@
-1100,7
+1100,7
@@
manage(Window w, XWindowAttributes *wa) {
if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
for(t = clients; t && t->win != trans; t = t->next);
if(t)
if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
for(t = clients; t && t->win != trans; t = t->next);
if(t)
- memcpy(c->tags, t->tags, sizeof
sel
tags);
+ memcpy(c->tags, t->tags, sizeof
ini
tags);
if(!c->isfloating)
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
if(!c->isfloating)
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
@@
-1181,7
+1181,7
@@
movemouse(Client *c) {
else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP)
ny = m->way + m->wah - c->h - 2 * c->border;
resize(c, nx, ny, c->w, c->h, False);
else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP)
ny = m->way + m->wah - c->h - 2 * c->border;
resize(c, nx, ny, c->w, c->h, False);
- memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof
sel
tags);
+ memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof
ini
tags);
break;
}
}
break;
}
}
@@
-1591,11
+1591,11
@@
setup(void) {
}
monitors[i].id = i;
}
monitors[i].id = i;
- monitors[i].seltags = emallocz(
LENGTH(tags)*sizeof(char*)
);
- monitors[i].prevtags = emallocz(
LENGTH(tags)*sizeof(char*)
);
+ monitors[i].seltags = emallocz(
sizeof initags
);
+ monitors[i].prevtags = emallocz(
sizeof initags
);
- memcpy(monitors[i].seltags,
seltags, sizeof sel
tags);
- memcpy(monitors[i].prevtags,
seltags, sizeof sel
tags);
+ memcpy(monitors[i].seltags,
initags, sizeof ini
tags);
+ memcpy(monitors[i].prevtags,
initags, sizeof ini
tags);
/* init appearance */
monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
/* init appearance */
monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
@@
-1950,7
+1950,7
@@
view(const char *arg) {
Monitor *m = &monitors[monitorat(-1, -1)];
Monitor *m = &monitors[monitorat(-1, -1)];
- memcpy(m->prevtags,
seltags, sizeof sel
tags);
+ memcpy(m->prevtags,
m->seltags, sizeof ini
tags);
for(i = 0; i < LENGTH(tags); i++)
m->seltags[i] = (NULL == arg);
m->seltags[idxoftag(arg)] = True;
for(i = 0; i < LENGTH(tags); i++)
m->seltags[i] = (NULL == arg);
m->seltags[idxoftag(arg)] = True;
@@
-1963,9
+1963,9
@@
viewprevtag(const char *arg) {
Monitor *m = &monitors[monitorat(-1, -1)];
Monitor *m = &monitors[monitorat(-1, -1)];
- memcpy(tmp, m->seltags, sizeof
sel
tags);
- memcpy(m->seltags, m->prevtags, sizeof
sel
tags);
- memcpy(m->prevtags, tmp, sizeof
sel
tags);
+ memcpy(tmp, m->seltags, sizeof
ini
tags);
+ memcpy(m->seltags, m->prevtags, sizeof
ini
tags);
+ memcpy(m->prevtags, tmp, sizeof
ini
tags);
arrange();
}
arrange();
}
@@
-2011,7
+2011,7
@@
movetomonitor(const char *arg) {
if (sel) {
sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount;
if (sel) {
sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount;
- memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof
sel
tags);
+ memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof
ini
tags);
resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True);
arrange();
}
resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True);
arrange();
}