Mercurial > aewl
diff event.c @ 268:a47b3b0d7bf4
applied Sanders LD and resize patches
author | Anselm R.Garbe <arg@10ksloc.org> |
---|---|
date | Mon, 14 Aug 2006 08:43:19 +0200 |
parents | 8a8ea74e1b87 |
children | dacd3f3c5823 |
line wrap: on
line diff
--- a/event.c Mon Aug 14 08:38:26 2006 +0200 +++ b/event.c Mon Aug 14 08:43:19 2006 +0200 @@ -58,6 +58,7 @@ resizemouse(Client *c) { int ocx, ocy; + int nw, nh; Corner sticky; XEvent ev; @@ -76,8 +77,10 @@ break; case MotionNotify: XSync(dpy, False); - c->w = abs(ocx - ev.xmotion.x); - c->h = abs(ocy - ev.xmotion.y); + if((nw = abs(ocx - ev.xmotion.x))) + c->w = abs(ocx - ev.xmotion.x); + if((nh = abs(ocy - ev.xmotion.y))) + c->h = abs(ocy - ev.xmotion.y); c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; if(ocx <= ev.xmotion.x)