X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.c;h=725f70bd5d07dc8879af37053845f964c4b22c8b;hb=bda53ac6ad834824e8e5d5678ccd638a122c173a;hp=dce06e94a068dd03c6376f514bb6b439d6805780;hpb=8e37c78ce3c33842a5800a445f90a3079a377eb6;p=dwm.git diff --git a/client.c b/client.c index dce06e9..725f70b 100644 --- a/client.c +++ b/client.c @@ -281,6 +281,16 @@ resize(Client *c, Bool sizehints, Corner sticky) { if(sticky == BotLeft || sticky == BotRight) c->y = bottom - c->h; + /* offscreen appearance fixes */ + if(c->x + c->w < 0) + c->x = 0; + if(c->y + c->h < bh) + c->y = bh; + if(c->x > sw) + c->x = sw - c->w; + if(c->y > sh) + c->y = sh - c->h; + resizetitle(c); wc.x = c->x; wc.y = c->y; @@ -398,6 +408,7 @@ void unmanage(Client *c) { Client *nc; + /* The server grab construct avoids race conditions. */ XGrabServer(dpy); XSetErrorHandler(xerrordummy);