diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-02-14 14:01:12 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-14 14:01:12 +0100 |
| commit | 3ce8c9f33844a995e79329978db9d2cd3981e032 (patch) | |
| tree | 58c918da4f17a1d81440cc97f6e031fd3938a58a /client.c | |
| parent | Added tag 3.5 for changeset 63ad05e7f9e1 (diff) | |
| download | dwm-3ce8c9f33844a995e79329978db9d2cd3981e032.tar.gz dwm-3ce8c9f33844a995e79329978db9d2cd3981e032.zip | |
added ban() which takes care than a banned window is not banned again... (this reduces the overall ConfigureNotify's to clients)
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -68,6 +68,14 @@ xerrordummy(Display *dsply, XErrorEvent *ee) { | |||
| 68 | /* extern */ | 68 | /* extern */ |
| 69 | 69 | ||
| 70 | void | 70 | void |
| 71 | ban(Client *c) { | ||
| 72 | if(!c || c->isbanned) | ||
| 73 | return; | ||
| 74 | c->isbanned = True; | ||
| 75 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); | ||
| 76 | } | ||
| 77 | |||
| 78 | void | ||
| 71 | configure(Client *c) { | 79 | configure(Client *c) { |
| 72 | XConfigureEvent ce; | 80 | XConfigureEvent ce; |
| 73 | 81 | ||
| @@ -190,7 +198,7 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 190 | c->next = clients; | 198 | c->next = clients; |
| 191 | c->snext = stack; | 199 | c->snext = stack; |
| 192 | stack = clients = c; | 200 | stack = clients = c; |
| 193 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); | 201 | ban(c); |
| 194 | XMapWindow(dpy, c->win); | 202 | XMapWindow(dpy, c->win); |
| 195 | setclientstate(c, NormalState); | 203 | setclientstate(c, NormalState); |
| 196 | if(isvisible(c)) | 204 | if(isvisible(c)) |
