dwm-meillo

diff client.c @ 100:bb3803fb560c

floating clients get random (x,y) offsets now
author arg@10ksloc.org
date Wed, 19 Jul 2006 13:22:49 +0200
parents a19556fe83b5
children 17c526ee321c
line diff
     1.1 --- a/client.c	Wed Jul 19 11:31:04 2006 +0200
     1.2 +++ b/client.c	Wed Jul 19 13:22:49 2006 +0200
     1.3 @@ -192,6 +192,7 @@
     1.4  void
     1.5  manage(Window w, XWindowAttributes *wa)
     1.6  {
     1.7 +	int diff;
     1.8  	Client *c;
     1.9  	XSetWindowAttributes twa;
    1.10  	Window trans;
    1.11 @@ -205,6 +206,12 @@
    1.12  	c->bw = c->fw = c->tw = wa->width;
    1.13  	c->fh = c->th = wa->height;
    1.14  	c->bh = bh;
    1.15 +
    1.16 +	diff = sw - c->fw;
    1.17 +	c->fx = sx + (random() % diff ? diff : 1);
    1.18 +	diff = sh - c->fh;
    1.19 +	c->fy = sx + (random() % diff ? diff : 1);
    1.20 +
    1.21  	c->border = 1;
    1.22  	c->proto = getproto(c->win);
    1.23  	setsize(c);