void
ban(Client *c) {
- if (c->isbanned)
+ if(c->isbanned)
return;
- XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ XUnmapWindow(dpy, c->win);
+ setclientstate(c, IconicState);
c->isbanned = True;
+ c->unmapped++;
}
void
void
focus(Client *c) {
- if((!c && selscreen)|| (c && !isvisible(c)))
+ if((!c && selscreen) || (c && !isvisible(c)))
for(c = stack; c && !isvisible(c); c = c->snext);
if(sel && sel != c) {
grabbuttons(sel, False);
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
attachstack(c);
- ban(c);
- XMapWindow(dpy, w);
- setclientstate(c, NormalState);
+ c->isbanned = True;
focus(c);
lt->arrange();
}
void
unban(Client *c) {
- if (!c->isbanned)
+ if(!c->isbanned)
return;
- XMoveWindow(dpy, c->win, c->x, c->y);
+ XMapWindow(dpy, c->win);
+ setclientstate(c, NormalState);
c->isbanned = False;
}
# dwm version
-VERSION = 4.3
+VERSION = 4.4
# Customize below to fit your system
int rx, ry, rw, rh; /* revert geometry */
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int minax, maxax, minay, maxay;
+ int unmapped;
long flags;
unsigned int border, oldborder;
Bool isbanned, isfixed, ismax, isfloating;
Client *c;
XUnmapEvent *ev = &e->xunmap;
- if((c = getclient(ev->window)))
- unmanage(c);
+ if((c = getclient(ev->window)) && (ev->event == root)) {
+ if(ev->send_event || c->unmapped-- == 0)
+ unmanage(c);
+ }
}
/* extern */