about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c7
1 files changed, 7 insertions, 0 deletions
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);
/blame/continuation3.mu?h=hlt&id=1cd833619e355c70d5d96a208cd67ba3a3ccb937'>^
a3195d44 ^
5059f32d ^
a3195d44 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34