summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/dwm.c b/dwm.c
index fb6bcb8..547218a 100644
--- a/dwm.c
+++ b/dwm.c
@@ -297,7 +297,7 @@ applyrules(Client *c) {
297 if(ch.res_name) 297 if(ch.res_name)
298 XFree(ch.res_name); 298 XFree(ch.res_name);
299 if(!matched_tag) 299 if(!matched_tag)
300 memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof seltags); 300 memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof initags);
301 if (!matched_monitor) 301 if (!matched_monitor)
302 c->monitor = monitorat(-1, -1); 302 c->monitor = monitorat(-1, -1);
303} 303}
@@ -1056,7 +1056,7 @@ manage(Window w, XWindowAttributes *wa) {
1056 XWindowChanges wc; 1056 XWindowChanges wc;
1057 1057
1058 c = emallocz(sizeof(Client)); 1058 c = emallocz(sizeof(Client));
1059 c->tags = emallocz(sizeof seltags); 1059 c->tags = emallocz(sizeof initags);
1060 c->win = w; 1060 c->win = w;
1061 1061
1062 applyrules(c); 1062 applyrules(c);
@@ -1100,7 +1100,7 @@ manage(Window w, XWindowAttributes *wa) {
1100 if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) 1100 if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
1101 for(t = clients; t && t->win != trans; t = t->next); 1101 for(t = clients; t && t->win != trans; t = t->next);
1102 if(t) 1102 if(t)
1103 memcpy(c->tags, t->tags, sizeof seltags); 1103 memcpy(c->tags, t->tags, sizeof initags);
1104 if(!c->isfloating) 1104 if(!c->isfloating)
1105 c->isfloating = (rettrans == Success) || c->isfixed; 1105 c->isfloating = (rettrans == Success) || c->isfixed;
1106 attach(c); 1106 attach(c);
@@ -1181,7 +1181,7 @@ movemouse(Client *c) {
1181 else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP) 1181 else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP)
1182 ny = m->way + m->wah - c->h - 2 * c->border; 1182 ny = m->way + m->wah - c->h - 2 * c->border;
1183 resize(c, nx, ny, c->w, c->h, False); 1183 resize(c, nx, ny, c->w, c->h, False);
1184 memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof seltags); 1184 memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof initags);
1185 break; 1185 break;
1186 } 1186 }
1187 } 1187 }
@@ -1591,11 +1591,11 @@ setup(void) {
1591 } 1591 }
1592 1592
1593 monitors[i].id = i; 1593 monitors[i].id = i;
1594 monitors[i].seltags = emallocz(LENGTH(tags)*sizeof(char*)); 1594 monitors[i].seltags = emallocz(sizeof initags);
1595 monitors[i].prevtags = emallocz(LENGTH(tags)*sizeof(char*)); 1595 monitors[i].prevtags = emallocz(sizeof initags);
1596 1596
1597 memcpy(monitors[i].seltags, seltags, sizeof seltags); 1597 memcpy(monitors[i].seltags, initags, sizeof initags);
1598 memcpy(monitors[i].prevtags, seltags, sizeof seltags); 1598 memcpy(monitors[i].prevtags, initags, sizeof initags);
1599 1599
1600 /* init appearance */ 1600 /* init appearance */
1601 monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); 1601 monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
@@ -1950,7 +1950,7 @@ view(const char *arg) {
1950 1950
1951 Monitor *m = &monitors[monitorat(-1, -1)]; 1951 Monitor *m = &monitors[monitorat(-1, -1)];
1952 1952
1953 memcpy(m->prevtags, seltags, sizeof seltags); 1953 memcpy(m->prevtags, m->seltags, sizeof initags);
1954 for(i = 0; i < LENGTH(tags); i++) 1954 for(i = 0; i < LENGTH(tags); i++)
1955 m->seltags[i] = (NULL == arg); 1955 m->seltags[i] = (NULL == arg);
1956 m->seltags[idxoftag(arg)] = True; 1956 m->seltags[idxoftag(arg)] = True;
@@ -1963,9 +1963,9 @@ viewprevtag(const char *arg) {
1963 1963
1964 Monitor *m = &monitors[monitorat(-1, -1)]; 1964 Monitor *m = &monitors[monitorat(-1, -1)];
1965 1965
1966 memcpy(tmp, m->seltags, sizeof seltags); 1966 memcpy(tmp, m->seltags, sizeof initags);
1967 memcpy(m->seltags, m->prevtags, sizeof seltags); 1967 memcpy(m->seltags, m->prevtags, sizeof initags);
1968 memcpy(m->prevtags, tmp, sizeof seltags); 1968 memcpy(m->prevtags, tmp, sizeof initags);
1969 arrange(); 1969 arrange();
1970} 1970}
1971 1971
@@ -2011,7 +2011,7 @@ movetomonitor(const char *arg) {
2011 if (sel) { 2011 if (sel) {
2012 sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount; 2012 sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount;
2013 2013
2014 memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof seltags); 2014 memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof initags);
2015 resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True); 2015 resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True);
2016 arrange(); 2016 arrange();
2017 } 2017 }