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@
This commit is contained in:
marc 2008-01-01 22:28:59 +00:00
parent 2e72df662d
commit 219f297493

View File

@ -806,9 +806,11 @@ client_placecalc(struct client_ctx *cc)
mousey = MAX(mousey, (int)cc->bwidth); mousey = MAX(mousey, (int)cc->bwidth);
if (cc->size->flags & USPosition) { if (cc->size->flags & USPosition) {
if (cc->size->x > 0)
x = cc->size->x; x = cc->size->x;
if (x <= 0 || x >= xmax) if (x <= 0 || x >= xmax)
x = cc->bwidth; x = cc->bwidth;
if (cc->size->y > 0)
y = cc->size->y; y = cc->size->y;
if (y <= 0 || y >= ymax) if (y <= 0 || y >= ymax)
y = cc->bwidth; y = cc->bwidth;