commit 225aee7072ca9c565a40949b9a243111ddb65edc
parent eb1652d7a96681ecf8c7dd5a24879166bdf5afc9
Author: Kris Maglione <bsdaemon@wmii.de>
Date: Tue, 20 Jun 2006 20:40:34 -0400
Fixed memory leak on destroying clients
Diffstat:
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -382,6 +382,8 @@ destroy_client(Client *c)
for(v=view; v; v=v->next)
detach_from_view(v, c);
+ *c->tags = '\0';
+ update_client_views(c);
unmap_client(c);
diff --git a/cmd/wm/view.c b/cmd/wm/view.c
@@ -300,7 +300,7 @@ arrange_view(View *v)
}
}
-static void
+void
update_client_views(Client *c)
{
static ViewLink *free_view_links = nil;
diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h
@@ -326,6 +326,7 @@ void arrange_view(View *v);
void scale_view(View *v, float w);
View *create_view(const char *name);
void focus_view(View *v);
+void update_client_views(Client *c);
XRectangle *rects_of_view(View *v, unsigned int *num);
View *view_of_id(unsigned short id);
void select_view(const char *arg);