aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authormarc2008-01-01 22:28:59 +0000
committermarc2008-01-01 22:28:59 +0000
commit6c6cb1a07bc09995e9a60237f0c83fe500b783ec (patch)
treef52f3671c7fa131ca9468cdf23970d83e7c6b26f /client.c
parent41c5ed0af6285c344148e31f5bc4ef89826c0a79 (diff)
downloadcwm-6c6cb1a07bc09995e9a60237f0c83fe500b783ec.tar.gz
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@
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 5 insertions, 3 deletions
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 <marius@monkey.org>
* 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 {