- if(!sel)
- sel = c;
- else if(sel != c) {
- old = sel;
- sel = c;
- if(old) {
- grabbuttons(old, False);
- drawclient(old);
- }
+ if(sel && sel != c) {
+ grabbuttons(sel, False);
+ XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
}
else
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
}
else
- if(c->y + c->h + 2 * BORDERPX > sh)
- c->y = sh - c->h - 2 * BORDERPX;
- if(c->h != sh && c->y < bh)
- c->y = bh;
+ c->y = sy;
+ }
+ else {
+ c->border = BORDERPX;
+ if(c->x + c->w + 2 * c->border > wax + waw)
+ c->x = wax + waw - c->w - 2 * c->border;
+ if(c->y + c->h + 2 * c->border > way + wah)
+ c->y = way + wah - c->h - 2 * c->border;
+ if(c->x < wax)
+ c->x = wax;
+ if(c->y < way)
+ c->y = way;
+ }
+ updatesizehints(c);
c->proto = getproto(c->win);
XSelectInput(dpy, c->win,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
XGetTransientForHint(dpy, c->win, &trans);
grabbuttons(c, False);
c->proto = getproto(c->win);
XSelectInput(dpy, c->win,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
XGetTransientForHint(dpy, c->win, &trans);
grabbuttons(c, False);
-resize(Client *c, Bool sizehints, Corner sticky) {
- int bottom = c->y + c->h;
- int right = c->x + c->w;
+resize(Client *c, Bool sizehints) {
XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);