diff options
author | arg@10ksloc.org <unknown> | 2006-07-19 13:22:49 +0200 |
---|---|---|
committer | arg@10ksloc.org <unknown> | 2006-07-19 13:22:49 +0200 |
commit | aebd745f72d3bc049d0af68aec33cf17277b20e9 (patch) | |
tree | 4cb7de83634747d5fe6f5f50fce7315ed6b90693 | |
parent | c53980cddcee8afd13ea793134ed3ddf5dbef0e3 (diff) | |
download | dwm-aebd745f72d3bc049d0af68aec33cf17277b20e9.tar.gz dwm-aebd745f72d3bc049d0af68aec33cf17277b20e9.tar.bz2 dwm-aebd745f72d3bc049d0af68aec33cf17277b20e9.zip |
floating clients get random (x,y) offsets now
-rw-r--r-- | client.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |