|
@@ -389,7 +389,6 @@ arrange(Monitor *m) {
|
389
|
389
|
showhide(m->stack);
|
390
|
390
|
else for(m = mons; m; m = m->next)
|
391
|
391
|
showhide(m->stack);
|
392
|
|
- focus(NULL);
|
393
|
392
|
if(m)
|
394
|
393
|
arrangemon(m);
|
395
|
394
|
else for(m = mons; m; m = m->next)
|
|
@@ -598,6 +597,7 @@ configurenotify(XEvent *e) {
|
598
|
597
|
updatebars();
|
599
|
598
|
for(m = mons; m; m = m->next)
|
600
|
599
|
XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
|
|
600
|
+ focus(NULL);
|
601
|
601
|
arrange(NULL);
|
602
|
602
|
}
|
603
|
603
|
}
|
|
@@ -1154,9 +1154,13 @@ manage(Window w, XWindowAttributes *wa) {
|
1154
|
1154
|
attach(c);
|
1155
|
1155
|
attachstack(c);
|
1156
|
1156
|
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
|
1157
|
|
- XMapWindow(dpy, c->win);
|
1158
|
1157
|
setclientstate(c, NormalState);
|
|
1158
|
+ if (c->mon == selmon)
|
|
1159
|
+ unfocus(selmon->sel, False);
|
|
1160
|
+ c->mon->sel = c;
|
1159
|
1161
|
arrange(c->mon);
|
|
1162
|
+ XMapWindow(dpy, c->win);
|
|
1163
|
+ focus(NULL);
|
1160
|
1164
|
}
|
1161
|
1165
|
|
1162
|
1166
|
void
|
|
@@ -1621,6 +1625,7 @@ void
|
1621
|
1625
|
tag(const Arg *arg) {
|
1622
|
1626
|
if(selmon->sel && arg->ui & TAGMASK) {
|
1623
|
1627
|
selmon->sel->tags = arg->ui & TAGMASK;
|
|
1628
|
+ focus(NULL);
|
1624
|
1629
|
arrange(selmon);
|
1625
|
1630
|
}
|
1626
|
1631
|
}
|
|
@@ -1701,6 +1706,7 @@ toggletag(const Arg *arg) {
|
1701
|
1706
|
newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
|
1702
|
1707
|
if(newtags) {
|
1703
|
1708
|
selmon->sel->tags = newtags;
|
|
1709
|
+ focus(NULL);
|
1704
|
1710
|
arrange(selmon);
|
1705
|
1711
|
}
|
1706
|
1712
|
}
|
|
@@ -1711,6 +1717,7 @@ toggleview(const Arg *arg) {
|
1711
|
1717
|
|
1712
|
1718
|
if(newtagset) {
|
1713
|
1719
|
selmon->tagset[selmon->seltags] = newtagset;
|
|
1720
|
+ focus(NULL);
|
1714
|
1721
|
arrange(selmon);
|
1715
|
1722
|
}
|
1716
|
1723
|
}
|
|
@@ -1976,6 +1983,7 @@ view(const Arg *arg) {
|
1976
|
1983
|
selmon->seltags ^= 1; /* toggle sel tagset */
|
1977
|
1984
|
if(arg->ui & TAGMASK)
|
1978
|
1985
|
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
|
|
1986
|
+ focus(NULL);
|
1979
|
1987
|
arrange(selmon);
|
1980
|
1988
|
}
|
1981
|
1989
|
|