Browse Source

floating clients get random (x,y) offsets now

config
arg@10ksloc.org 18 years ago
parent
commit
aebd745f72
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      client.c

+ 7
- 0
client.c View File

@ -192,6 +192,7 @@ lower(Client *c)
void void
manage(Window w, XWindowAttributes *wa) manage(Window w, XWindowAttributes *wa)
{ {
int diff;
Client *c; Client *c;
XSetWindowAttributes twa; XSetWindowAttributes twa;
Window trans; Window trans;
@ -205,6 +206,12 @@ manage(Window w, XWindowAttributes *wa)
c->bw = c->fw = c->tw = wa->width; c->bw = c->fw = c->tw = wa->width;
c->fh = c->th = wa->height; c->fh = c->th = wa->height;
c->bh = bh; 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->border = 1;
c->proto = getproto(c->win); c->proto = getproto(c->win);
setsize(c); setsize(c);


Loading…
Cancel
Save