diff options
author | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 08:43:19 +0200 |
---|---|---|
committer | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 08:43:19 +0200 |
commit | 95766d6241a401b3665ac1ad528b90c55e7b6810 (patch) | |
tree | 09789c6cf44cbb37dba40bbe4ba3c771d9b904ef /event.c | |
parent | 4cb78a170c6daa488a90dffb60224fcf2b76fbf0 (diff) | |
download | dwm-95766d6241a401b3665ac1ad528b90c55e7b6810.tar.gz dwm-95766d6241a401b3665ac1ad528b90c55e7b6810.tar.bz2 dwm-95766d6241a401b3665ac1ad528b90c55e7b6810.zip |
applied Sanders LD and resize patches
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -58,6 +58,7 @@ static void resizemouse(Client *c) { int ocx, ocy; + int nw, nh; Corner sticky; XEvent ev; @@ -76,8 +77,10 @@ resizemouse(Client *c) 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) |