+ /*
+ * Under stress conditions windows sometimes do not get removed
+ * from the managed list. Use a very large hammer to get rid
+ * of them. A smaller hammer would be nice.
+ */
+ TAILQ_FOREACH(w, &ws->winlist, entry) {
+ if (win == w)
+ continue; /* can't happen but oh well */
+
+ if (getstate(w->id) != -1)
+ continue;
+
+ /* see if we have a destroy event */
+ if (XCheckIfEvent(display, &de, destroy_notify_cb,
+ (char *)w) == False)
+ unmanage_window(w); /* no event, help it */
+ else
+ XPutBackEvent(display, &de); /* oops */
+ }
+