comparison client.c @ 60:24f9c674d03f

made stdin reader more robust
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 12:08:32 +0200
parents f005d46462e8
children 0a4b066ce254
comparison
equal deleted inserted replaced
59:5d4653de9a1c 60:24f9c674d03f
402 402
403 for(l = &clients; *l; l = &(*l)->next); 403 for(l = &clients; *l; l = &(*l)->next);
404 c->next = *l; /* *l == nil */ 404 c->next = *l; /* *l == nil */
405 *l = c; 405 *l = c;
406 406
407 XMapRaised(dpy, c->win);
408 XMapRaised(dpy, c->title);
409 XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask, 407 XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
410 GrabModeAsync, GrabModeSync, None, None); 408 GrabModeAsync, GrabModeSync, None, None);
411 XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask, 409 XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
412 GrabModeAsync, GrabModeSync, None, None); 410 GrabModeAsync, GrabModeSync, None, None);
413 XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask, 411 XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
416 if(!c->floating) 414 if(!c->floating)
417 c->floating = trans 415 c->floating = trans
418 || ((c->maxw == c->minw) && (c->maxh == c->minh)); 416 || ((c->maxw == c->minw) && (c->maxh == c->minh));
419 417
420 arrange(NULL); 418 arrange(NULL);
421 if(c->tags[tsel]) 419 /* mapping the window now prevents flicker */
420 if(c->tags[tsel]) {
421 XMapRaised(dpy, c->win);
422 XMapRaised(dpy, c->title);
422 focus(c); 423 focus(c);
423 else 424 }
425 else {
424 ban_client(c); 426 ban_client(c);
427 XMapRaised(dpy, c->win);
428 XMapRaised(dpy, c->title);
429 }
425 } 430 }
426 431
427 void 432 void
428 gravitate(Client *c, Bool invert) 433 gravitate(Client *c, Bool invert)
429 { 434 {