SL-12085 Debug log for show() and PeekMessage

User's viewer freezes right after setStartupState( STATE_LOGIN_CLEANUP ) and these places are primary suspects
master
Andrey Kleshchev 2020-06-16 23:52:29 +03:00
parent 71b66c758e
commit d202f460e2
3 changed files with 7 additions and 1 deletions

View File

@ -714,6 +714,7 @@ LLWindowWin32::~LLWindowWin32()
void LLWindowWin32::show()
{
LL_DEBUGS("Window") << "Setting window to show" << LL_ENDL;
ShowWindow(mWindowHandle, SW_SHOW);
SetForegroundWindow(mWindowHandle);
SetFocus(mWindowHandle);

View File

@ -811,6 +811,7 @@ bool idle_startup()
show_debug_menus();
// Hide the splash screen
LL_DEBUGS("AppInit") << "Hide the splash screen and show window" << LL_ENDL;
LLSplashScreen::hide();
// Push our window frontmost
gViewerWindow->getWindow()->show();
@ -818,9 +819,12 @@ bool idle_startup()
// DEV-16927. The following code removes errant keystrokes that happen while the window is being
// first made visible.
#ifdef _WIN32
LL_DEBUGS("AppInit") << "Processing PeekMessage" << LL_ENDL;
MSG msg;
while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) )
{ }
{
}
LL_DEBUGS("AppInit") << "PeekMessage processed" << LL_ENDL;
#endif
display_startup();
timeout.reset();

View File

@ -253,6 +253,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gWindowResized)
{ //skip render on frames where window has been resized
LL_DEBUGS("Window") << "Resizing window" << LL_ENDL;
LL_RECORD_BLOCK_TIME(FTM_RESIZE_WINDOW);
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);