floating clients get random (x,y) offsets now
arg@10ksloc.org unknown
Wed, 19 Jul 2006 13:22:49 +0200
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
client.c
→
client.c
@@ -192,6 +192,7 @@
void manage(Window w, XWindowAttributes *wa) { + int diff; Client *c; XSetWindowAttributes twa; Window trans;@@ -205,6 +206,12 @@ c->by = c->fy = c->ty += bh;
c->bw = c->fw = c->tw = wa->width; c->fh = c->th = wa->height; c->bh = bh; + + diff = sw - c->fw; + c->fx = sx + (random() % diff ? diff : 1); + diff = sh - c->fh; + c->fy = sx + (random() % diff ? diff : 1); + c->border = 1; c->proto = getproto(c->win); setsize(c);