@@ -337,12 +337,13 @@ void DeleteWindowByClass(WindowClass cls
{
Window *w;
for (w = _windows; w != _last_window;) {
restart_search:
/* When we find the window to delete, we need to restart the search
* as deleting this window could cascade in deleting (many) others */
for (w = _windows; w != _last_window; w++) {
if (w->window_class == cls) {
DeleteWindow(w);
w = _windows;
} else {
w++;
goto restart_search;
}
@@ -355,12 +356,13 @@ void DeletePlayerWindows(PlayerID id)
if (w->caption_color == id) {
@@ -1756,7 +1758,10 @@ void DeleteNonVitalWindows(void)
if (w->window_class != WC_MAIN_WINDOW &&
w->window_class != WC_SELECT_GAME &&
w->window_class != WC_MAIN_TOOLBAR &&
@@ -1765,9 +1770,7 @@ void DeleteNonVitalWindows(void)
w->window_class != WC_TOOLTIPS &&
(w->flags4 & WF_STICKY) == 0) { // do not delete windows which are 'pinned'
@@ -1781,15 +1784,15 @@ void DeleteAllNonVitalWindows(void)
// Delete every window except for stickied ones
/* Delete every window except for stickied ones, then sticky ones as well */
DeleteNonVitalWindows();
// Delete all sticked windows
if (w->flags4 & WF_STICKY) {
Status change: