diff options
author | marc <marc> | 2008-01-01 22:28:59 +0000 |
---|---|---|
committer | marc <marc> | 2008-01-01 22:28:59 +0000 |
commit | 219f297493ae2593fd3dc92a0ad454f4fdc5e62f (patch) | |
tree | 543c5b7aa5c033964f3387d6e1ec956dd6185687 | |
parent | 2e72df662d00e066e5f58450f6ac28e00ff94983 (diff) | |
download | cwm-219f297493ae2593fd3dc92a0ad454f4fdc5e62f.tar.gz cwm-219f297493ae2593fd3dc92a0ad454f4fdc5e62f.tar.xz cwm-219f297493ae2593fd3dc92a0ad454f4fdc5e62f.zip |
Only use the x,y values from the XSizeHints structure when they are greater
than zero. The fields are obsolete and not always used. OK jasper@
-rw-r--r-- | client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client.c b/client.c index f21b114..e957597 100644 --- a/client.c +++ b/client.c @@ -806,10 +806,12 @@ client_placecalc(struct client_ctx *cc) mousey = MAX(mousey, (int)cc->bwidth); if (cc->size->flags & USPosition) { - x = cc->size->x; + if (cc->size->x > 0) + x = cc->size->x; if (x <= 0 || x >= xmax) x = cc->bwidth; - y = cc->size->y; + if (cc->size->y > 0) + y = cc->size->y; if (y <= 0 || y >= ymax) y = cc->bwidth; } else { |