From 6c6cb1a07bc09995e9a60237f0c83fe500b783ec Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 1 Jan 2008 22:28:59 +0000 Subject: 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index e974242..32948e2 100644 --- a/client.c +++ b/client.c @@ -4,7 +4,7 @@ * Copyright (c) 2004 Marius Aamodt Eriksen * All rights reserved. * - * $Id: client.c,v 1.7 2007/10/02 18:01:45 jasper Exp $ + * $Id: client.c,v 1.8 2008/01/01 22:28:59 marc Exp $ */ #include "headers.h" @@ -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 { -- cgit v1.2.3-2-gb3c3