summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp20
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)