{
Client *old = sel;
- if (!issel)
+ if(!issel)
return;
- if(sel && sel->ismax && sel != c)
- togglemax(NULL);
- sel = c;
- if(old && old != c) {
+ if(!sel)
+ sel = c;
+ else if(sel != c) {
+ if(sel->ismax)
+ togglemax(NULL);
+ sel = c;
grabbutton(old, AnyButton, 0);
drawtitle(old);
}
void
manage(Window w, XWindowAttributes *wa)
{
+ unsigned int i;
Client *c, *tc;
Window trans;
XSetWindowAttributes twa;
grabbutton(c, Button2, MODKEY);
grabbutton(c, Button3, MODKEY);
- settags(c);
+ if((tc = getclient(trans))) /* inherit tags */
+ for(i = 0; i < ntags; i++)
+ c->tags[i] = tc->tags[i];
+ else
+ settags(c);
if(!c->isfloat)
c->isfloat = trans
|| (c->maxw && c->minw &&