aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-14 12:08:32 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-14 12:08:32 +0200
commiteb756ee169ad0c94167ff41a9ab2712b348afe4f (patch)
tree8178d9656383549e553e4ac768e9808f41fcecd2 /client.c
parent0e5c8198bc5a69e87b0114b81d6569188828edfa (diff)
downloaddwm-eb756ee169ad0c94167ff41a9ab2712b348afe4f.tar.gz
made stdin reader more robust
Diffstat (limited to 'client.c')
-rw-r--r--client.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/client.c b/client.c
index e0ab719..3aae7e0 100644
--- a/client.c
+++ b/client.c
@@ -404,8 +404,6 @@ manage(Window w, XWindowAttributes *wa)
c->next = *l; /* *l == nil */
*l = c;
- XMapRaised(dpy, c->win);
- XMapRaised(dpy, c->title);
XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
@@ -418,10 +416,17 @@ manage(Window w, XWindowAttributes *wa)
|| ((c->maxw == c->minw) && (c->maxh == c->minh));
arrange(NULL);
- if(c->tags[tsel])
+ /* mapping the window now prevents flicker */
+ if(c->tags[tsel]) {
+ XMapRaised(dpy, c->win);
+ XMapRaised(dpy, c->title);
focus(c);
- else
+ }
+ else {
ban_client(c);
+ XMapRaised(dpy, c->win);
+ XMapRaised(dpy, c->title);
+ }
}
void