floating clients get random (x,y) offsets now aebd745f
arg@10ksloc.org · 2006-07-19 13:22 1 file(s) · +7 −0
client.c +7 −0
192 192
void
193 193
manage(Window w, XWindowAttributes *wa)
194 194
{
195 +
	int diff;
195 196
	Client *c;
196 197
	XSetWindowAttributes twa;
197 198
	Window trans;
205 206
	c->bw = c->fw = c->tw = wa->width;
206 207
	c->fh = c->th = wa->height;
207 208
	c->bh = bh;
209 +
210 +
	diff = sw - c->fw;
211 +
	c->fx = sx + (random() % diff ? diff : 1);
212 +
	diff = sh - c->fh;
213 +
	c->fy = sx + (random() % diff ? diff : 1);
214 +
208 215
	c->border = 1;
209 216
	c->proto = getproto(c->win);
210 217
	setsize(c);