summaryrefslogtreecommitdiff
path: root/indra/llui/lltabcontainer.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-11-23 15:40:36 -0500
committerNat Goodspeed <nat@lindenlab.com>2021-11-23 15:40:36 -0500
commit37900e593d65e93913774f118a9aa461eeb8ef58 (patch)
treea2f5e34820aa7147b85684cdb136c0cd57165239 /indra/llui/lltabcontainer.cpp
parent30cf50e6af3183680bd6413573eecd95b1f4fbb5 (diff)
SL-16094: Fix second startup hang.
Add LLWindowWin32Thread::Post(), like post() except it uses PostMessage() to send the work item to the window thread. Support this in mainWindowProc(). Move LLWindowWin32::recreateWindow()'s destroy_window_handler() call onto the window thread. Delaying destruction of the old HWND ensures that we can use PostMessage() and GetMessage() with that HWND to pass the lambda work item. Moreover, it's likely to be less buggy to call DestroyWindow() on the same thread that created the window. Make recreateWindow()'s window thread lambda bind the window class parameters by value, rather than binding 'this' and back-referencing LLWindowWin32 members. Make recreateWindow() construct the window thread lambda and then decide whether to pass it to the window thread using post() or Post(), depending on whether we have a current HWND -- therefore whether the window thread is blocked on GetMessage(). That means we can eliminate the kickWindowThread() call. Make destroy_window_handler() accept HWND by value rather than by non-const reference. Since it doesn't attempt to modify the caller's value, this is a better match for the function's semantics anyway -- but importantly, it lets us pass a const HWND.
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
0 files changed, 0 insertions, 0 deletions