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 | |
| 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 '')
| -rw-r--r-- | client.c | 17 | ||||
| -rw-r--r-- | config.mk | 2 | ||||
| -rw-r--r-- | dwm.h | 1 | ||||
| -rw-r--r-- | event.c | 6 |
4 files changed, 15 insertions, 11 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 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | # dwm version | 1 | # dwm version |
| 2 | VERSION = 4.3 | 2 | VERSION = 4.4 |
| 3 | 3 | ||
| 4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
| 5 | 5 | ||
| @@ -48,6 +48,7 @@ struct Client { | |||
| 48 | int rx, ry, rw, rh; /* revert geometry */ | 48 | int rx, ry, rw, rh; /* revert geometry */ |
| 49 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; | 49 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
| 50 | int minax, maxax, minay, maxay; | 50 | int minax, maxax, minay, maxay; |
| 51 | int unmapped; | ||
| 51 | long flags; | 52 | long flags; |
| 52 | unsigned int border, oldborder; | 53 | unsigned int border, oldborder; |
| 53 | Bool isbanned, isfixed, ismax, isfloating; | 54 | Bool isbanned, isfixed, ismax, isfloating; |
| @@ -336,8 +336,10 @@ unmapnotify(XEvent *e) { | |||
| 336 | Client *c; | 336 | Client *c; |
| 337 | XUnmapEvent *ev = &e->xunmap; | 337 | XUnmapEvent *ev = &e->xunmap; |
| 338 | 338 | ||
| 339 | if((c = getclient(ev->window))) | 339 | if((c = getclient(ev->window)) && (ev->event == root)) { |
| 340 | unmanage(c); | 340 | if(ev->send_event || c->unmapped-- == 0) |
| 341 | unmanage(c); | ||
| 342 | } | ||
| 341 | } | 343 | } |
| 342 | 344 | ||
| 343 | /* extern */ | 345 | /* extern */ |
