# HG changeset patch # User Anselm R. Garbe # Date 1169655895 -3600 # Node ID 09452e717bfdd533a683271a7dd9b2cdc24c5ad1 # Parent 7a65648a2c8860adfe96794f997a39cbf7ec753c applied offscreen appearance hotfix diff -r 7a65648a2c88 -r 09452e717bfd client.c --- a/client.c Wed Jan 24 12:12:29 2007 +0100 +++ b/client.c Wed Jan 24 17:24:55 2007 +0100 @@ -142,14 +142,14 @@ } else { c->border = BORDERPX; + if(c->x + c->w + 2 * c->border > wax + waw) + c->x = wax + waw - c->w - 2 * c->border; + if(c->y + c->h + 2 * c->border > way + wah) + c->y = way + wah - c->h - 2 * c->border; if(c->x < wax) c->x = wax; if(c->y < way) c->y = way; - if(c->x + c->w + 2 * c->border > wax + waw) - c->x = wax + waw - c->w - 2 * c->border; - if(c->y + c->h + 2 * c->border > way + wah) - c->y = way + wah - c->h - 2 * c->border; } updatesizehints(c); c->proto = getproto(c->win); @@ -197,14 +197,14 @@ else c->border = BORDERPX; /* offscreen appearance fixes */ + if(c->x > sw) + c->x = sw - c->w - 2 * c->border; + if(c->y > sh) + c->y = sh - c->h - 2 * c->border; if(c->x + c->w + 2 * c->border < sx) c->x = sx; if(c->y + c->h + 2 * c->border < sy) c->y = sy; - if(c->x > sw) - c->x = sw - c->w - 2 * c->border; - if(c->y > sh) - c->y = sh - c->h - 2 * c->border; wc.x = c->x; wc.y = c->y; wc.width = c->w;