]> git.armaanb.net Git - dwm.git/commitdiff
applied Sanders LD and resize patches
authorAnselm R.Garbe <arg@10ksloc.org>
Mon, 14 Aug 2006 06:43:19 +0000 (08:43 +0200)
committerAnselm R.Garbe <arg@10ksloc.org>
Mon, 14 Aug 2006 06:43:19 +0000 (08:43 +0200)
Makefile
config.mk
event.c

index 9ef219a53c575f6adbbf5a8ae7f0e594ad0831fa..a0bfc0c45668481aa62b5a757782f477fb32cbae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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:
index d84b47ead70f8e0687bf437ac5a2d736bd0323bc..21594813644baee48047f4a2919791c131463add 100644 (file)
--- 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}
diff --git a/event.c b/event.c
index bc7d42c2a452097cf6e741c9e376374766af23d7..1a8de56b208373c5e94b7100278f5583c51c0d39 100644 (file)
--- a/event.c
+++ b/event.c
@@ -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)