changed ban/unban implementation to not move the windows anymore, but map/unmap them instead - PLEASE TEST THIS
Anselm R. Garbe garbeam@gmail.com
Sat, 28 Jul 2007 17:18:45 +0200
M
client.c
→
client.c
@@ -98,10 +98,12 @@ }
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@@ -135,7 +137,7 @@ }
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);@@ -224,9 +226,7 @@ if(!c->isfloating)
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(); }@@ -308,9 +308,10 @@ }
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; }