applied Peters two patches, please test hg tip, if nothing breaks this is 5.9 d83454f6
garbeam@gmail.com · 2011-07-09 07:57 1 file(s) · +7 −2
dwm.c +7 −2
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 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
	}
1149 1149
	attach(c);
1150 1150
	attachstack(c);
1151 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 1152
	setclientstate(c, NormalState);
1154 1153
	arrange(c->mon);
1154 +
	XMapWindow(dpy, c->win);
1155 +
	focus(c);
1155 1156
}
1156 1157
1157 1158
void
1616 1617
tag(const Arg *arg) {
1617 1618
	if(selmon->sel && arg->ui & TAGMASK) {
1618 1619
		selmon->sel->tags = arg->ui & TAGMASK;
1620 +
		focus(NULL);
1619 1621
		arrange(selmon);
1620 1622
	}
1621 1623
}
1696 1698
	newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
1697 1699
	if(newtags) {
1698 1700
		selmon->sel->tags = newtags;
1701 +
		focus(NULL);
1699 1702
		arrange(selmon);
1700 1703
	}
1701 1704
}
1706 1709
1707 1710
	if(newtagset) {
1708 1711
		selmon->tagset[selmon->seltags] = newtagset;
1712 +
		focus(NULL);
1709 1713
		arrange(selmon);
1710 1714
	}
1711 1715
}
1971 1975
	selmon->seltags ^= 1; /* toggle sel tagset */
1972 1976
	if(arg->ui & TAGMASK)
1973 1977
		selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
1978 +
	focus(NULL);
1974 1979
	arrange(selmon);
1975 1980
}
1976 1981