Remove destroyed clients from the save set. Closes issue #129.

This commit is contained in:
Kris Maglione 2010-01-23 16:56:42 -05:00
parent 5e753ad1ce
commit fde667e1aa
3 changed files with 9 additions and 3 deletions

View File

@ -293,12 +293,16 @@ client_destroy(Client *c) {
else
reparentwindow(&c->w, &scr.root, r.min);
if(starting > -1)
XRemoveFromSaveSet(display, c->w.xid);
traperrors(false);
XUngrabServer(display);
none = nil;
client_setviews(c, &none);
client_unmap(c, WithdrawnState);
if(starting > -1)
client_unmap(c, WithdrawnState);
refree(&c->tagre);
refree(&c->tagvre);
free(c->retags);
@ -307,7 +311,8 @@ client_destroy(Client *c) {
ewmh_destroyclient(c);
group_remove(c);
event("DestroyClient %C\n", c);
if(starting > -1)
event("DestroyClient %C\n", c);
flushevents(FocusChangeMask, true);
free(c->w.hints);

View File

@ -385,7 +385,7 @@ typedef void (*XHandler)(XEvent*);
EXTERN XHandler handler[LASTEvent];
/* Misc */
EXTERN bool starting;
EXTERN int starting;
EXTERN bool resizing;
EXTERN long ignoreenter;
EXTERN char* user;

View File

@ -225,6 +225,7 @@ init_screens(void) {
static void
cleanup(void) {
starting = -1;
while(client)
client_destroy(client);
ixp_server_close(&srv);