From aebd745f72d3bc049d0af68aec33cf17277b20e9 Mon Sep 17 00:00:00 2001
From: "arg@10ksloc.org" <unknown>
Date: Wed, 19 Jul 2006 13:22:49 +0200
Subject: [PATCH] floating clients get random (x,y) offsets now

---
 client.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/client.c b/client.c
index af2c249..62d4afc 100644
--- a/client.c
+++ b/client.c
@@ -192,6 +192,7 @@ lower(Client *c)
 void
 manage(Window w, XWindowAttributes *wa)
 {
+	int diff;
 	Client *c;
 	XSetWindowAttributes twa;
 	Window trans;
@@ -205,6 +206,12 @@ manage(Window w, XWindowAttributes *wa)
 	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);