event.c: only shuffle when we delete, not on all destroy events

This commit is contained in:
Iris Lightshard 2021-03-06 00:19:56 -05:00
parent 55d6921b45
commit 943b4fd82a
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

10
event.c
View file

@ -292,23 +292,23 @@ void newwindow(XCreateWindowEvent* e) {
void destroy(Window w) {
int i;
Client* c;
int v;
// int v;
curtime = CurrentTime;
c = getclient(w, 0);
if (c == 0)
return;
v = c->virt;
// v = c->virt;
if (numvirtuals > 1)
for (i = 0; i < numvirtuals; i++)
if (currents[i] == c)
currents[i] = 0;
rmclient(c);
if (v == virt) {
shuffle(0);
}
//if (v == virt) {
// shuffle(0);
//}
/* flush any errors generated by the window's sudden demise */
ignore_badwindow = 1;