c->tw = c->w + 2;
c->tx = c->x + c->w - c->tw + 2;
c->ty = c->y;
- if(c->tags[tsel])
+ if(isvisible(c))
XMoveResizeWindow(dpy, c->title, c->tx, c->ty, c->tw, c->th);
else
XMoveResizeWindow(dpy, c->title, c->tx + 2 * sw, c->ty, c->tw, c->th);
if (!issel)
return;
Client *old = sel;
- XEvent ev;
sel = c;
if(old && old != c)
drawtitle(old);
drawtitle(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
- XSync(dpy, False);
- while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
void
if(!(c = getnext(sel->next)))
c = getnext(clients);
if(c) {
- higher(c);
focus(c);
+ restack();
}
}
c = getprev(c);
}
if(c) {
- higher(c);
focus(c);
+ restack();
}
}
c->y += dy;
}
-void
-higher(Client *c)
-{
- XRaiseWindow(dpy, c->win);
- XRaiseWindow(dpy, c->title);
-}
-
void
killclient(Arg *arg)
{
|| (c->maxw && c->minw &&
c->maxw == c->minw && c->maxh == c->minh);
settitle(c);
- arrange(NULL);
- /* mapping the window now prevents flicker */
- XMapRaised(dpy, c->win);
- XMapRaised(dpy, c->title);
- if(c->tags[tsel])
+ if(isvisible(c))
+ sel = c;
+ arrange(NULL);
+ XMapWindow(dpy, c->win);
+ XMapWindow(dpy, c->title);
+ if(isvisible(c))
focus(c);
}
sel->w = sw - 2;
sel->h = sh - 2 - bh;
- higher(sel);
+ restack();
resize(sel, arrange == dofloat, TopLeft);
sel->x = ox;
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);
- arrange(NULL);
if(sel)
focus(sel);
+ arrange(NULL);
}
void
clients->prev = sel;
sel->next = clients;
clients = sel;
- arrange(NULL);
focus(sel);
+ arrange(NULL);
}