diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-07-28 17:18:45 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-07-28 17:18:45 +0200 |
| commit | a54cf2ecef2ca83441dccd454c694b92bca42a16 (patch) | |
| tree | d793de29a6ceeafba2d0030c64a076d5dfd6ffa8 /client.c | |
| parent | removed shiftview(), if you scroll the views in the tag area, you can also us... (diff) | |
| download | dwm-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 'client.c')
| -rw-r--r-- | client.c | 17 |
1 files changed, 9 insertions, 8 deletions
| @@ -98,10 +98,12 @@ attach(Client *c) { | |||
| 98 | 98 | ||
| 99 | void | 99 | void |
| 100 | ban(Client *c) { | 100 | ban(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 | ||
| 107 | void | 109 | void |
| @@ -135,7 +137,7 @@ detach(Client *c) { | |||
| 135 | 137 | ||
| 136 | void | 138 | void |
| 137 | focus(Client *c) { | 139 | focus(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 | ||
| 309 | void | 309 | void |
| 310 | unban(Client *c) { | 310 | unban(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 | ||
