applied Sanders LD and resize patches
This commit is contained in:
parent
4cb78a170c
commit
95766d6241
3
Makefile
3
Makefile
|
@ -14,6 +14,7 @@ options:
|
||||||
@echo "CFLAGS = ${CFLAGS}"
|
@echo "CFLAGS = ${CFLAGS}"
|
||||||
@echo "LDFLAGS = ${LDFLAGS}"
|
@echo "LDFLAGS = ${LDFLAGS}"
|
||||||
@echo "CC = ${CC}"
|
@echo "CC = ${CC}"
|
||||||
|
@echo "LD = ${LD}"
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@echo CC $<
|
@echo CC $<
|
||||||
|
@ -27,7 +28,7 @@ config.h:
|
||||||
|
|
||||||
dwm: ${OBJ}
|
dwm: ${OBJ}
|
||||||
@echo LD $@
|
@echo LD $@
|
||||||
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
@${LD} -o $@ ${OBJ} ${LDFLAGS}
|
||||||
@strip $@
|
@strip $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -20,5 +20,6 @@ LDFLAGS = ${LIBS}
|
||||||
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
||||||
#LDFLAGS = -g ${LIBS}
|
#LDFLAGS = -g ${LIBS}
|
||||||
|
|
||||||
# compiler
|
# compiler and linker
|
||||||
CC = cc
|
CC = cc
|
||||||
|
LD = ${CC}
|
||||||
|
|
7
event.c
7
event.c
|
@ -58,6 +58,7 @@ static void
|
||||||
resizemouse(Client *c)
|
resizemouse(Client *c)
|
||||||
{
|
{
|
||||||
int ocx, ocy;
|
int ocx, ocy;
|
||||||
|
int nw, nh;
|
||||||
Corner sticky;
|
Corner sticky;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
|
@ -76,8 +77,10 @@ resizemouse(Client *c)
|
||||||
break;
|
break;
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
c->w = abs(ocx - ev.xmotion.x);
|
if((nw = abs(ocx - ev.xmotion.x)))
|
||||||
c->h = abs(ocy - ev.xmotion.y);
|
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->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
|
||||||
c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
|
c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
|
||||||
if(ocx <= ev.xmotion.x)
|
if(ocx <= ev.xmotion.x)
|
||||||
|
|
Loading…
Reference in New Issue