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