tapplied Sanders LD and resize patches - dwm - [fork] customized build of dwm, … | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 95766d6241a401b3665ac1ad528b90c55e7b6810 | |
parent 4cb78a170c6daa488a90dffb60224fcf2b76fbf0 | |
Author: Anselm R.Garbe <[email protected]> | |
Date: Mon, 14 Aug 2006 08:43:19 +0200 | |
applied Sanders LD and resize patches | |
Diffstat: | |
M Makefile | 3 ++- | |
M config.mk | 3 ++- | |
M event.c | 7 +++++-- | |
3 files changed, 9 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/Makefile b/Makefile | |
t@@ -14,6 +14,7 @@ options: | |
@echo "CFLAGS = ${CFLAGS}" | |
@echo "LDFLAGS = ${LDFLAGS}" | |
@echo "CC = ${CC}" | |
+ @echo "LD = ${LD}" | |
.c.o: | |
@echo CC $< | |
t@@ -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 | |
t@@ -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 | |
t@@ -58,6 +58,7 @@ static void | |
resizemouse(Client *c) | |
{ | |
int ocx, ocy; | |
+ int nw, nh; | |
Corner sticky; | |
XEvent ev; | |
t@@ -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) |