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 "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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,5 +20,6 @@ LDFLAGS = ${LIBS}
 | 
			
		|||
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
 | 
			
		||||
#LDFLAGS = -g ${LIBS}
 | 
			
		||||
 | 
			
		||||
# compiler
 | 
			
		||||
# compiler and linker
 | 
			
		||||
CC = cc
 | 
			
		||||
LD = ${CC}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								event.c
								
								
								
								
							
							
						
						
									
										3
									
								
								event.c
								
								
								
								
							| 
						 | 
				
			
			@ -58,6 +58,7 @@ static void
 | 
			
		|||
resizemouse(Client *c)
 | 
			
		||||
{
 | 
			
		||||
	int ocx, ocy;
 | 
			
		||||
	int nw, nh;
 | 
			
		||||
	Corner sticky;
 | 
			
		||||
	XEvent ev;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -76,7 +77,9 @@ resizemouse(Client *c)
 | 
			
		|||
			break;
 | 
			
		||||
		case MotionNotify:
 | 
			
		||||
			XSync(dpy, False);
 | 
			
		||||
			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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue