diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-10-28 22:53:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-28 22:53:24 +0200 |
commit | 9c0a6d1b0e5e9d6da6a63ff367f40ab08c064bbe (patch) | |
tree | 70ee7701d7a24a0759915f8050786ed43a8a2a7a /indra/llwindow/llwindowwin32.cpp | |
parent | 0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (diff) | |
parent | b2f1e8899b32f681e13705d684db9a93d18450ae (diff) |
Merge pull request #2966 from secondlife/marchcat/c-develop
develop → Maint C sync
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index bacf5325fe..70bdb25415 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -343,6 +343,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool LLWindowWin32Thread(); void run() override; + void close() override; // Detroys handles and window // Either post to or call from window thread @@ -407,6 +408,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18 bool mGLReady = false; bool mGotGLBuffer = false; + bool mShuttingDown = false; LLAtomicBool mDeleteOnExit = false; }; @@ -4587,11 +4589,25 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList() #endif // LL_WINDOWS inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread() - : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, false) + : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, true /*should be false, temporary workaround for SL-18721*/) { LL::ThreadPool::start(); } +void LLWindowWin32::LLWindowWin32Thread::close() +{ + LL::ThreadPool::close(); + if (!mShuttingDown) + { + LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL; + // Workaround for SL-18721 in case window closes too early and abruptly + LLSplashScreen::show(); + LLSplashScreen::update("..."); // will be updated later + mShuttingDown = true; + } +} + + /** * LogChange is to log changes in status while trying to avoid spamming the * log with repeated messages, especially in a tight loop. It refuses to log @@ -4835,6 +4851,8 @@ bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() return false; } + mShuttingDown = true; + // Make sure we don't leave a blank toolbar button. // Also hiding window now prevents user from suspending it // via some action (like dragging it around) |