projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c53980c
)
floating clients get random (x,y) offsets now
author
arg@10ksloc.org
<unknown>
Wed, 19 Jul 2006 11:22:49 +0000
(13:22 +0200)
committer
arg@10ksloc.org
<unknown>
Wed, 19 Jul 2006 11:22:49 +0000
(13:22 +0200)
client.c
patch
|
blob
|
history
diff --git
a/client.c
b/client.c
index af2c2497f1f65af3c176c2e7bcbcd818ec30f3cf..62d4afc3fe621c3991ce66218c753b67d26fd7d4 100644
(file)
--- 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);