From 4dea507e509ac473f01479c2ff00cc3887785721 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 3 Jun 2019 22:49:45 +0200 Subject: [PATCH] Fix #9360: sticky windows can be closed --- src/openrct2/interface/Window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 0bea48d6fc..8a27297683 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -363,12 +363,14 @@ void window_close_all() { window_close_by_class(WC_DROPDOWN); - auto it = g_window_list.begin(); - while (it != g_window_list.end()) + for (auto it = g_window_list.begin(); it != g_window_list.end();) { auto itNext = std::next(it); auto w = it->get(); - window_close(w); + if (!(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))) + { + window_close(w); + } it = itNext; } }