From cf3fe70f1f245c82a7b1adab6a42d92205d692be Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Mar 2026 09:04:47 -0700 Subject: [PATCH] fix: hide window on shutdown to prevent OS force-close dialog SDL_HideWindow immediately on shutdown so the OS doesn't show a "not responding" dialog during the slow cleanup process. --- src/core/application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/application.cpp b/src/core/application.cpp index 76556a6e..22e93abc 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -576,6 +576,12 @@ void Application::run() { void Application::shutdown() { LOG_WARNING("Shutting down application..."); + // Hide the window immediately so the OS doesn't think the app is frozen + // during the (potentially slow) resource cleanup below. + if (window && window->getSDLWindow()) { + SDL_HideWindow(window->getSDLWindow()); + } + // Stop background world preloader before destroying AssetManager cancelWorldPreload();