diff --git a/CHANGELOG.md b/CHANGELOG.md index 2307ad5c8..8a2691d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ - Bugfix: Fixed avatar in usercard and moderation button triggering when releasing the mouse outside their area. (#5052) - Bugfix: Fixed moderator-only topics being subscribed to for non-moderators. (#5056) - Bugfix: Fixed a bug where buttons would remain in a hovered state after leaving them. (#5077) +- Bugfix: Fixed popup windows not persisting between restarts. (#5081) - Bugfix: Fixed splits not retaining their focus after minimizing. (#5080) - Dev: Run miniaudio in a separate thread, and simplify it to not manage the device ourselves. There's a chance the simplification is a bad idea. (#4978) - Dev: Change clang-format from v14 to v16. (#4929) diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index 791fddcaf..038c45f8f 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -421,7 +421,14 @@ void WindowManager::save() { return; } - qCDebug(chatterinoWindowmanager) << "[WindowManager] Saving"; + + if (this->shuttingDown_) + { + qCDebug(chatterinoWindowmanager) << "Skipping save (shutting down)"; + return; + } + + qCDebug(chatterinoWindowmanager) << "Saving"; assertInGuiThread(); QJsonDocument document; @@ -700,6 +707,9 @@ void WindowManager::closeAll() { assertInGuiThread(); + qCDebug(chatterinoWindowmanager) << "Shutting down (closing windows)"; + this->shuttingDown_ = true; + for (Window *window : windows_) { window->close(); diff --git a/src/singletons/WindowManager.hpp b/src/singletons/WindowManager.hpp index 22a68655c..4e3ed7d37 100644 --- a/src/singletons/WindowManager.hpp +++ b/src/singletons/WindowManager.hpp @@ -140,6 +140,7 @@ private: const QString windowLayoutFilePath; bool initialized_ = false; + bool shuttingDown_ = false; QPoint emotePopupPos_;