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

View File

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

View File

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