swk

static widget kit
git clone git://git.suckless.org/swk
Log | Files | Refs | README | LICENSE

commit 72797613986f8437b4227493aa9ccbb69263ac3a
parent 25d523c1f86d52cfc814e6c11615ae21478eba44
Author: pancake <pancake@nopcode.org>
Date:   Wed,  1 Sep 2010 00:43:56 +0200

* Properly fix fPIC build
Diffstat:
Makefile | 15++++++---------
gi_x11.c | 2+-
swk.c | 6+++---
text.c | 2+-
4 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all rmo t clean install +.PHONY: all t clean install -include config.mk @@ -36,13 +36,10 @@ config.h: config.mk: config.h cp config.def.mk config.mk -clean: rmo +clean: echo >swk.mk cd t && ${MAKE} clean - rm -f swk.pc swk.mk libswk.a libswk.so ${GI_OBJS} - -rmo: - rm -f ${OBJS} + rm -f swk.pc swk.mk libswk.a libswk.so ${OBJS} ${GI_OBJS} install: mkdir -p ${DESTDIR}/${INCDIR} @@ -66,12 +63,12 @@ static: libswk.a shared: libswk.so -libswk.so: rmo config.mk ${OBJS} ${GI_OBJS} - ${CC} ${CFLAGS} -fPIC -shared ${OBJS} ${GI_SRCS} -o libswk.so +libswk.so: config.mk ${OBJS} ${GI_OBJS} + ${CC} ${CFLAGS} -fPIC -shared image.c swk.c text.c ${GI_SRCS} -o libswk.so swk.o: config.mk -libswk.a: rmo config.mk ${OBJS} ${GI_OBJS} +libswk.a: config.mk ${OBJS} ${GI_OBJS} rm -f libswk.a ar qcvf libswk.a ${OBJS} ${GI_OBJS} echo SWKINCS+=-I${PREFIX}/include > swk.mk diff --git a/gi_x11.c b/gi_x11.c @@ -13,7 +13,7 @@ #include "config.h" //#define FONTNAME "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*" -#define FONTNAME "10x20" +#define FONTNAME "--10x20" static int fs = FONTSIZE; // TODO: we need fsW and fsH static Window window; diff --git a/swk.c b/swk.c @@ -426,9 +426,6 @@ swk_entry(SwkEvent *e) { } } break; - default: - swk_label(e); - break; case EExpose: // XXX: add support for cursor (handle arrow keys) swk_gi_fill(e->box->r, ColorBG, 1); @@ -451,6 +448,9 @@ swk_entry(SwkEvent *e) { swk_gi_fill(r, ColorFG, 2); } break; + default: + swk_label(e); + break; } } diff --git a/text.c b/text.c @@ -116,7 +116,7 @@ text_cur(Text *t, int num, int dir) { t->cur = 0; if(t->cur>t->len) t->cur = t->len; - if(t->text[t->cur]=='\n') + if(dir<0 && t->text[t->cur]=='\n') t->cur+=dir; }