summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-14 14:01:12 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-14 14:01:12 +0100
commit3ce8c9f33844a995e79329978db9d2cd3981e032 (patch)
tree58c918da4f17a1d81440cc97f6e031fd3938a58a /client.c
parentAdded tag 3.5 for changeset 63ad05e7f9e1 (diff)
downloaddwm-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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/client.c b/client.c
index 486efe9..3505e76 100644
--- a/client.c
+++ b/client.c
@@ -68,6 +68,14 @@ xerrordummy(Display *dsply, XErrorEvent *ee) {
68/* extern */ 68/* extern */
69 69
70void 70void
71ban(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
78void
71configure(Client *c) { 79configure(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))