This commit is contained in:
Julien Danjou 2007-12-28 12:39:40 +01:00
parent 14909f47a9
commit 56596cc24d
2 changed files with 9 additions and 8 deletions

View file

@ -21,7 +21,7 @@ INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags libconfuse xft cairo`
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs libconfuse xft cairo` -lXext -lXrandr -lXinerama LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs libconfuse xft cairo` -lXext -lXrandr -lXinerama
# flags # flags
CFLAGS = -std=gnu99 -ggdb3 -pipe -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare -Wunused -Winit-self -Wpointer-arith -Wredundant-decls -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn -O3 ${INCS} -DVERSION=\"${VERSION}\" -DRELEASE=\"${RELEASE}\" CFLAGS = -std=gnu99 -ggdb3 -pipe -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare -Wunused -Winit-self -Wpointer-arith -Wredundant-decls -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn -O0 ${INCS} -DVERSION=\"${VERSION}\" -DRELEASE=\"${RELEASE}\"
LDFLAGS = -ggdb3 ${LIBS} LDFLAGS = -ggdb3 ${LIBS}
CLIENTLDFLAGS = -ggdb3 CLIENTLDFLAGS = -ggdb3

15
focus.c
View file

@ -29,11 +29,11 @@ extern AwesomeConf globalconf;
static FocusList * static FocusList *
focus_get_node_by_client(Client *c) focus_get_node_by_client(Client *c)
{ {
FocusList *fh; FocusList *fl;
for(fh = globalconf.focus; fh; fh = fh->prev) for(fl = globalconf.focus; fl; fl = fl->prev)
if(fh->client == c) if(fl->client == c)
return fh; return fl;
return NULL; return NULL;
} }
@ -86,10 +86,11 @@ focus_add_client(Client *c)
void void
focus_delete_client(Client *c) focus_delete_client(Client *c)
{ {
FocusList *fc = focus_get_node_by_client(c), *target; FocusList *target = focus_get_node_by_client(c);
if (fc)
if(target)
{ {
target = focus_detach_node(fc); focus_detach_node(target);
p_delete(&target); p_delete(&target);
} }
} }