diff options
author | Anselm R.Garbe | 2006-08-14 08:43:19 +0200 |
---|---|---|
committer | Anselm R.Garbe | 2006-08-14 08:43:19 +0200 |
commit | 7b1a1c425d31f578ee0aa9cb522fd3a84d45f245 (patch) | |
tree | 5f8682e079340ee2d7224eeac0cf3b3253331f63 | |
parent | 610679034e04b398a99972f9eec559f397c70b30 (diff) | |
download | aur-7b1a1c425d31f578ee0aa9cb522fd3a84d45f245.tar.gz |
applied Sanders LD and resize patches
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | config.mk | 3 | ||||
-rw-r--r-- | event.c | 7 |
3 files changed, 9 insertions, 4 deletions
@@ -14,6 +14,7 @@ options: @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" + @echo "LD = ${LD}" .c.o: @echo CC $< @@ -27,7 +28,7 @@ config.h: dwm: ${OBJ} @echo LD $@ - @${CC} -o $@ ${OBJ} ${LDFLAGS} + @${LD} -o $@ ${OBJ} ${LDFLAGS} @strip $@ clean: diff --git a/config.mk b/config.mk index d84b47ead70f..21594813644b 100644 --- a/config.mk +++ b/config.mk @@ -20,5 +20,6 @@ LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} -# compiler +# compiler and linker CC = cc +LD = ${CC} @@ -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) |