diff options
| -rw-r--r-- | dwm.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -389,7 +389,6 @@ arrange(Monitor *m) { | |||
| 389 | showhide(m->stack); | 389 | showhide(m->stack); |
| 390 | else for(m = mons; m; m = m->next) | 390 | else for(m = mons; m; m = m->next) |
| 391 | showhide(m->stack); | 391 | showhide(m->stack); |
| 392 | focus(NULL); | ||
| 393 | if(m) | 392 | if(m) |
| 394 | arrangemon(m); | 393 | arrangemon(m); |
| 395 | else for(m = mons; m; m = m->next) | 394 | else for(m = mons; m; m = m->next) |
| @@ -598,6 +597,7 @@ configurenotify(XEvent *e) { | |||
| 598 | updatebars(); | 597 | updatebars(); |
| 599 | for(m = mons; m; m = m->next) | 598 | for(m = mons; m; m = m->next) |
| 600 | XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); | 599 | XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); |
| 600 | focus(NULL); | ||
| 601 | arrange(NULL); | 601 | arrange(NULL); |
| 602 | } | 602 | } |
| 603 | } | 603 | } |
| @@ -1149,9 +1149,10 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 1149 | attach(c); | 1149 | attach(c); |
| 1150 | attachstack(c); | 1150 | attachstack(c); |
| 1151 | XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ | 1151 | XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ |
| 1152 | XMapWindow(dpy, c->win); | ||
| 1153 | setclientstate(c, NormalState); | 1152 | setclientstate(c, NormalState); |
| 1154 | arrange(c->mon); | 1153 | arrange(c->mon); |
| 1154 | XMapWindow(dpy, c->win); | ||
| 1155 | focus(c); | ||
| 1155 | } | 1156 | } |
| 1156 | 1157 | ||
| 1157 | void | 1158 | void |
| @@ -1616,6 +1617,7 @@ void | |||
| 1616 | tag(const Arg *arg) { | 1617 | tag(const Arg *arg) { |
| 1617 | if(selmon->sel && arg->ui & TAGMASK) { | 1618 | if(selmon->sel && arg->ui & TAGMASK) { |
| 1618 | selmon->sel->tags = arg->ui & TAGMASK; | 1619 | selmon->sel->tags = arg->ui & TAGMASK; |
| 1620 | focus(NULL); | ||
| 1619 | arrange(selmon); | 1621 | arrange(selmon); |
| 1620 | } | 1622 | } |
| 1621 | } | 1623 | } |
| @@ -1696,6 +1698,7 @@ toggletag(const Arg *arg) { | |||
| 1696 | newtags = selmon->sel->tags ^ (arg->ui & TAGMASK); | 1698 | newtags = selmon->sel->tags ^ (arg->ui & TAGMASK); |
| 1697 | if(newtags) { | 1699 | if(newtags) { |
| 1698 | selmon->sel->tags = newtags; | 1700 | selmon->sel->tags = newtags; |
| 1701 | focus(NULL); | ||
| 1699 | arrange(selmon); | 1702 | arrange(selmon); |
| 1700 | } | 1703 | } |
| 1701 | } | 1704 | } |
| @@ -1706,6 +1709,7 @@ toggleview(const Arg *arg) { | |||
| 1706 | 1709 | ||
| 1707 | if(newtagset) { | 1710 | if(newtagset) { |
| 1708 | selmon->tagset[selmon->seltags] = newtagset; | 1711 | selmon->tagset[selmon->seltags] = newtagset; |
| 1712 | focus(NULL); | ||
| 1709 | arrange(selmon); | 1713 | arrange(selmon); |
| 1710 | } | 1714 | } |
| 1711 | } | 1715 | } |
| @@ -1971,6 +1975,7 @@ view(const Arg *arg) { | |||
| 1971 | selmon->seltags ^= 1; /* toggle sel tagset */ | 1975 | selmon->seltags ^= 1; /* toggle sel tagset */ |
| 1972 | if(arg->ui & TAGMASK) | 1976 | if(arg->ui & TAGMASK) |
| 1973 | selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; | 1977 | selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; |
| 1978 | focus(NULL); | ||
| 1974 | arrange(selmon); | 1979 | arrange(selmon); |
| 1975 | } | 1980 | } |
| 1976 | 1981 | ||
