dwm-meillo

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 diff
     1.1 --- a/event.c	Mon Aug 14 08:38:26 2006 +0200
     1.2 +++ b/event.c	Mon Aug 14 08:43:19 2006 +0200
     1.3 @@ -58,6 +58,7 @@
     1.4  resizemouse(Client *c)
     1.5  {
     1.6  	int ocx, ocy;
     1.7 +	int nw, nh;
     1.8  	Corner sticky;
     1.9  	XEvent ev;
    1.10  
    1.11 @@ -76,8 +77,10 @@
    1.12  			break;
    1.13  		case MotionNotify:
    1.14  			XSync(dpy, False);
    1.15 -			c->w = abs(ocx - ev.xmotion.x);
    1.16 -			c->h = abs(ocy - ev.xmotion.y);
    1.17 +			if((nw = abs(ocx - ev.xmotion.x)))
    1.18 +				c->w = abs(ocx - ev.xmotion.x);
    1.19 +			if((nh = abs(ocy - ev.xmotion.y)))
    1.20 +				c->h = abs(ocy - ev.xmotion.y);
    1.21  			c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
    1.22  			c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
    1.23  			if(ocx <= ev.xmotion.x)