dwm-meillo

changeset 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 bf6792e3e700
files Makefile config.mk event.c
diffstat 3 files changed, 9 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Mon Aug 14 08:38:26 2006 +0200
     1.2 +++ b/Makefile	Mon Aug 14 08:43:19 2006 +0200
     1.3 @@ -14,6 +14,7 @@
     1.4  	@echo "CFLAGS   = ${CFLAGS}"
     1.5  	@echo "LDFLAGS  = ${LDFLAGS}"
     1.6  	@echo "CC       = ${CC}"
     1.7 +	@echo "LD       = ${LD}"
     1.8  
     1.9  .c.o:
    1.10  	@echo CC $<
    1.11 @@ -27,7 +28,7 @@
    1.12  
    1.13  dwm: ${OBJ}
    1.14  	@echo LD $@
    1.15 -	@${CC} -o $@ ${OBJ} ${LDFLAGS}
    1.16 +	@${LD} -o $@ ${OBJ} ${LDFLAGS}
    1.17  	@strip $@
    1.18  
    1.19  clean:
     2.1 --- a/config.mk	Mon Aug 14 08:38:26 2006 +0200
     2.2 +++ b/config.mk	Mon Aug 14 08:43:19 2006 +0200
     2.3 @@ -20,5 +20,6 @@
     2.4  #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
     2.5  #LDFLAGS = -g ${LIBS}
     2.6  
     2.7 -# compiler
     2.8 +# compiler and linker
     2.9  CC = cc
    2.10 +LD = ${CC}
     3.1 --- a/event.c	Mon Aug 14 08:38:26 2006 +0200
     3.2 +++ b/event.c	Mon Aug 14 08:43:19 2006 +0200
     3.3 @@ -58,6 +58,7 @@
     3.4  resizemouse(Client *c)
     3.5  {
     3.6  	int ocx, ocy;
     3.7 +	int nw, nh;
     3.8  	Corner sticky;
     3.9  	XEvent ev;
    3.10  
    3.11 @@ -76,8 +77,10 @@
    3.12  			break;
    3.13  		case MotionNotify:
    3.14  			XSync(dpy, False);
    3.15 -			c->w = abs(ocx - ev.xmotion.x);
    3.16 -			c->h = abs(ocy - ev.xmotion.y);
    3.17 +			if((nw = abs(ocx - ev.xmotion.x)))
    3.18 +				c->w = abs(ocx - ev.xmotion.x);
    3.19 +			if((nh = abs(ocy - ev.xmotion.y)))
    3.20 +				c->h = abs(ocy - ev.xmotion.y);
    3.21  			c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
    3.22  			c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
    3.23  			if(ocx <= ev.xmotion.x)