new stuff, fixed several issues
Anselm R. Garbe garbeam@wmii.de
Wed, 12 Jul 2006 17:50:31 +0200
M
config.mk
→
config.mk
@@ -14,7 +14,7 @@ # includes and libs
LIBS = -L${PREFIX}/lib -L/usr/lib -lc -lm -L${X11LIB} -lX11 # Linux/BSD -CFLAGS = -g -Wall -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \ +CFLAGS = -g -Wall -O2 -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \ -DVERSION=\"${VERSION}\" LDFLAGS = -g ${LIBS}
M
event.c
→
event.c
@@ -186,11 +186,11 @@
if(ev->state == PropertyDelete) return; /* ignore */ - if(ev->atom == wm_atom[WMProtocols]) { - c->proto = win_proto(c->win); - return; - } if((c = getclient(ev->window))) { + if(ev->atom == wm_atom[WMProtocols]) { + c->proto = win_proto(c->win); + return; + } switch (ev->atom) { default: break; case XA_WM_TRANSIENT_FOR:
M
util.c
→
util.c
@@ -126,13 +126,14 @@ fprintf(stderr, "gridwm: execvp %s", argv[0]);
perror(" failed"); } else { - n = 0; + l = n = 0; close(pfd[1]); - while(l > n) { + while(n < len) { if((l = read(pfd[0], buf + n, len - n)) < 1) break; n += l; } + while(l > n); close(pfd[0]); buf[n < len ? n : len - 1] = 0; }
M
wm.c
→
wm.c
@@ -95,13 +95,12 @@
int win_proto(Window w) { - Atom *protocols; + unsigned char *protocols; long res; int protos = 0; int i; - res = win_property(w, wm_atom[WMProtocols], XA_ATOM, 20L, - ((unsigned char **) &protocols)); + res = win_property(w, wm_atom[WMProtocols], XA_ATOM, 20L, &protocols); if(res <= 0) { return protos; }