diff options
author | marc <marc> | 2008-01-03 20:20:20 +0000 |
---|---|---|
committer | marc <marc> | 2008-01-03 20:20:20 +0000 |
commit | 160d6aa910416ac7393876f6330b0a34371f7d69 (patch) | |
tree | 55ddc835a6475b267863a73cdb22e2427e68bb4a | |
parent | 847191cff3d72264f815738f045ff749d6d8ea18 (diff) | |
download | cwm-160d6aa910416ac7393876f6330b0a34371f7d69.tar.gz cwm-160d6aa910416ac7393876f6330b0a34371f7d69.tar.xz cwm-160d6aa910416ac7393876f6330b0a34371f7d69.zip |
Adjust initial window placement with any geometry that would place
the window at or over the right or bottom edge. OK oda@
-rw-r--r-- | client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client.c b/client.c index e957597..d9ff7e8 100644 --- a/client.c +++ b/client.c @@ -91,7 +91,6 @@ client_new(Window win, struct screen_ctx *sc, int mapped) cc->geom.y = wattr.y; cc->geom.width = wattr.width; cc->geom.height = wattr.height; - cc->geom.height = wattr.height; cc->cmap = wattr.colormap; if (wattr.map_state != IsViewable) { @@ -808,12 +807,16 @@ client_placecalc(struct client_ctx *cc) if (cc->size->flags & USPosition) { if (cc->size->x > 0) x = cc->size->x; - if (x <= 0 || x >= xmax) + if (x < cc->bwidth) x = cc->bwidth; + else if (x > xslack) + x = xslack; if (cc->size->y > 0) y = cc->size->y; - if (y <= 0 || y >= ymax) + if (y < cc->bwidth) y = cc->bwidth; + else if (y > yslack) + y = yslack; } else { if (yslack < 0) { y = cc->bwidth; |