changeset:   729:9c3bf42bdbf4
tag:         tip
user:        Anselm R. Garbe <arg_AT_suckless.org>
date:        Mon Feb 05 11:09:53 2007 +0100
files:       Makefile config.mk
description:
got rid of LD (inspired by JGs patch to wmii)
changeset:   728:295c8ca7a27a
user:        Anselm R. Garbe <arg_AT_suckless.org>
date:        Mon Feb 05 11:05:16 2007 +0100
files:       draw.c
description:
applied apm's patch proposal, getting rid of XDrawLines
diff -r 1a1f8a7e6729 -r 9c3bf42bdbf4 Makefile
--- a/Makefile	Thu Feb 01 08:23:00 2007 +0100
+++ b/Makefile	Mon Feb 05 11:09:53 2007 +0100
@@ -13,7 +13,6 @@ options:
         @echo "CFLAGS   = ${CFLAGS}"
         @echo "LDFLAGS  = ${LDFLAGS}"
         @echo "CC       = ${CC}"
-	@echo "LD       = ${LD}"
 
 .c.o:
         @echo CC $<
@@ -26,8 +25,8 @@ config.h:
         @cp config.default.h $@
 
 dwm: ${OBJ}
-	@echo LD $@
-	@${LD} -o $@ ${OBJ} ${LDFLAGS}
+	@echo CC -o $@
+	@${CC} -o $@ ${OBJ} ${LDFLAGS}
         @strip $@
 
 clean:
diff -r 1a1f8a7e6729 -r 9c3bf42bdbf4 config.mk
--- a/config.mk	Thu Feb 01 08:23:00 2007 +0100
+++ b/config.mk	Mon Feb 05 11:09:53 2007 +0100
@@ -27,4 +27,3 @@ LDFLAGS = ${LIBS}
 
 # compiler and linker
 CC = cc
-LD = ${CC}
diff -r 1a1f8a7e6729 -r 9c3bf42bdbf4 draw.c
--- a/draw.c	Thu Feb 01 08:23:00 2007 +0100
+++ b/draw.c	Mon Feb 05 11:09:53 2007 +0100
@@ -35,7 +35,6 @@ drawtext(const char *text, unsigned long
         unsigned int len, olen;
         XGCValues gcv;
         XRectangle r = { dc.x, dc.y, dc.w, dc.h };
-	XPoint pt[5];
 
         XSetForeground(dpy, dc.gc, col[ColBG]);
         XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
@@ -74,24 +73,15 @@ drawtext(const char *text, unsigned long
                 XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
         }
         x = (h + 2) / 4;
+	r.x = dc.x + 1;
+	r.y = dc.y + 1;
         if(filledsquare) {
-		r.x = dc.x + 1;
-		r.y = dc.y + 1;
                 r.width = r.height = x + 1;
                 XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
         }
         else if(emptysquare) {
-		pt[0].x = dc.x + 1;
-		pt[0].y = dc.y + 1;
-		pt[1].x = x;
-		pt[1].y = 0;
-		pt[2].x = 0;
-		pt[2].y = x;
-		pt[3].x = -x;
-		pt[3].y = 0;
-		pt[4].x = 0;
-		pt[4].y = -x;
-		XDrawLines(dpy, dc.drawable, dc.gc, pt, 5, CoordModePrevious);
+		r.width = r.height = x;
+		XDrawRectangles(dpy, dc.drawable, dc.gc, &r, 1);
         }
 }
 
Received on Mon Feb 05 2007 - 11:10:02 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:53 UTC