summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-07-28 17:18:45 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-07-28 17:18:45 +0200
commita54cf2ecef2ca83441dccd454c694b92bca42a16 (patch)
treed793de29a6ceeafba2d0030c64a076d5dfd6ffa8 /client.c
parentremoved shiftview(), if you scroll the views in the tag area, you can also us... (diff)
downloaddwm-a54cf2ecef2ca83441dccd454c694b92bca42a16.tar.gz
dwm-a54cf2ecef2ca83441dccd454c694b92bca42a16.zip
changed ban/unban implementation to not move the windows anymore, but map/unmap them instead - PLEASE TEST THIS
Diffstat (limited to '')
-rw-r--r--client.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/client.c b/client.c
index 68d10a7..85b1af8 100644
--- a/client.c
+++ b/client.c
@@ -98,10 +98,12 @@ attach(Client *c) {
98 98
99void 99void
100ban(Client *c) { 100ban(Client *c) {
101 if (c->isbanned) 101 if(c->isbanned)
102 return; 102 return;
103 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); 103 XUnmapWindow(dpy, c->win);
104 setclientstate(c, IconicState);
104 c->isbanned = True; 105 c->isbanned = True;
106 c->unmapped++;
105} 107}
106 108
107void 109void
@@ -135,7 +137,7 @@ detach(Client *c) {
135 137
136void 138void
137focus(Client *c) { 139focus(Client *c) {
138 if((!c && selscreen)|| (c && !isvisible(c))) 140 if((!c && selscreen) || (c && !isvisible(c)))
139 for(c = stack; c && !isvisible(c); c = c->snext); 141 for(c = stack; c && !isvisible(c); c = c->snext);
140 if(sel && sel != c) { 142 if(sel && sel != c) {
141 grabbuttons(sel, False); 143 grabbuttons(sel, False);
@@ -224,9 +226,7 @@ manage(Window w, XWindowAttributes *wa) {
224 c->isfloating = (rettrans == Success) || c->isfixed; 226 c->isfloating = (rettrans == Success) || c->isfixed;
225 attach(c); 227 attach(c);
226 attachstack(c); 228 attachstack(c);
227 ban(c); 229 c->isbanned = True;
228 XMapWindow(dpy, w);
229 setclientstate(c, NormalState);
230 focus(c); 230 focus(c);
231 lt->arrange(); 231 lt->arrange();
232} 232}
@@ -308,9 +308,10 @@ togglefloating(const char *arg) {
308 308
309void 309void
310unban(Client *c) { 310unban(Client *c) {
311 if (!c->isbanned) 311 if(!c->isbanned)
312 return; 312 return;
313 XMoveWindow(dpy, c->win, c->x, c->y); 313 XMapWindow(dpy, c->win);
314 setclientstate(c, NormalState);
314 c->isbanned = False; 315 c->isbanned = False;
315} 316}
316 317