diff options
author | marc | 2008-01-01 22:28:59 +0000 |
---|---|---|
committer | marc | 2008-01-01 22:28:59 +0000 |
commit | 6c6cb1a07bc09995e9a60237f0c83fe500b783ec (patch) | |
tree | f52f3671c7fa131ca9468cdf23970d83e7c6b26f | |
parent | 41c5ed0af6285c344148e31f5bc4ef89826c0a79 (diff) | |
download | cwm-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 '')
-rw-r--r-- | client.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 { |