From 219f297493ae2593fd3dc92a0ad454f4fdc5e62f Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 1 Jan 2008 22:28:59 +0000 Subject: [PATCH] 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@ --- client.c | 6 ++++-- 1 file 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 {