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
# 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}
CLIENTLDFLAGS = -ggdb3

15
focus.c
View File

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