summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-18 19:16:03 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-18 19:16:03 +0300
commitcfe0ba90352c48a2b9f5006c4c8e824dc472cdc9 (patch)
tree58515df5648b7a7819b4cb62e88431c1b4747e79 /indra/llwindow
parent61e318564e5c492ff7da70ef05f9596c4af8d369 (diff)
parente8b31d03b4f6f0ffb981b4ea150743daf7b4a958 (diff)
Merge branch 'master' into DRTVWR-515-maint
# Conflicts: # indra/newview/llimprocessing.cpp
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowwin32.cpp49
1 files changed, 31 insertions, 18 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 3cbba59ed7..7535f0deb7 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -747,6 +747,7 @@ LLWindowWin32::~LLWindowWin32()
void LLWindowWin32::show()
{
+ LL_DEBUGS("Window") << "Setting window to show" << LL_ENDL;
ShowWindow(mWindowHandle, SW_SHOW);
SetForegroundWindow(mWindowHandle);
SetFocus(mWindowHandle);
@@ -1159,6 +1160,12 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
mPostQuit = FALSE;
// create window
+ LL_DEBUGS("Window") << "Creating window with X: " << window_rect.left
+ << " Y: " << window_rect.top
+ << " Width: " << (window_rect.right - window_rect.left)
+ << " Height: " << (window_rect.bottom - window_rect.top)
+ << " Fullscreen: " << mFullscreen
+ << LL_ENDL;
DestroyWindow(mWindowHandle);
mWindowHandle = CreateWindowEx(dw_ex_style,
mWindowClassName,
@@ -1974,6 +1981,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( h_wnd, GWLP_USERDATA );
+ bool debug_window_proc = gDebugWindowProc || debugLoggingEnabled("Window");
+
if (NULL != window_imp)
{
@@ -2016,9 +2025,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_DEVICECHANGE:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_DEVICECHANGE");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
- LL_INFOS() << " WM_DEVICECHANGE: wParam=" << w_param
+ LL_INFOS("Window") << " WM_DEVICECHANGE: wParam=" << w_param
<< "; lParam=" << l_param << LL_ENDL;
}
if (w_param == DBT_DEVNODES_CHANGED || w_param == DBT_DEVICEARRIVAL)
@@ -2074,7 +2083,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
BOOL activating = (BOOL) w_param;
BOOL minimized = window_imp->getMinimized();
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC ActivateApp "
<< " activating " << S32(activating)
@@ -2125,7 +2134,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// JC - I'm not sure why, but if we don't report that we handled the
// WM_ACTIVATE message, the WM_ACTIVATEAPP messages don't work
// properly when we run fullscreen.
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC Activate "
<< " activating " << S32(activating)
@@ -2197,7 +2206,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYDOWN");
{
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "Debug WindowProc WM_KEYDOWN "
<< " key " << S32(w_param)
@@ -2223,7 +2232,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYUP");
LL_RECORD_BLOCK_TIME(FTM_KEYHANDLER);
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "Debug WindowProc WM_KEYUP "
<< " key " << S32(w_param)
@@ -2239,9 +2248,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_SETCONTEXT:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_SETCONTEXT");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
- LL_INFOS() << "WM_IME_SETCONTEXT" << LL_ENDL;
+ LL_INFOS("Window") << "WM_IME_SETCONTEXT" << LL_ENDL;
}
if (LLWinImm::isAvailable() && window_imp->mPreeditor)
{
@@ -2252,7 +2261,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_IME_STARTCOMPOSITION:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_STARTCOMPOSITION");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS() << "WM_IME_STARTCOMPOSITION" << LL_ENDL;
}
@@ -2265,7 +2274,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_IME_ENDCOMPOSITION:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_ENDCOMPOSITION");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS() << "WM_IME_ENDCOMPOSITION" << LL_ENDL;
}
@@ -2277,7 +2286,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_IME_COMPOSITION:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_COMPOSITION");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS() << "WM_IME_COMPOSITION" << LL_ENDL;
}
@@ -2290,7 +2299,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_IME_REQUEST:
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_REQUEST");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS() << "WM_IME_REQUEST" << LL_ENDL;
}
@@ -2321,7 +2330,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// characters. We just need to take care of surrogate pairs sent as two WM_CHAR's
// by ourselves. It is not that tough. -- Alissa Sabre @ SL
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_CHAR");
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "Debug WindowProc WM_CHAR "
<< " key " << S32(w_param)
@@ -2764,7 +2773,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
S32 width = S32( LOWORD(l_param) );
S32 height = S32( HIWORD(l_param) );
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
BOOL maximized = ( w_param == SIZE_MAXIMIZED );
BOOL restored = ( w_param == SIZE_RESTORED );
@@ -2839,7 +2848,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_SETFOCUS:
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL;
}
@@ -2848,7 +2857,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
return 0;
case WM_KILLFOCUS:
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL;
}
@@ -2880,7 +2889,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
break;
default:
{
- if (gDebugWindowProc)
+ if (debug_window_proc)
{
LL_INFOS("Window") << "Unhandled windows message code: " << U32(u_msg) << LL_ENDL;
}
@@ -2890,7 +2899,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->mCallbacks->handlePauseWatchdog(window_imp);
}
-
+ else
+ {
+ // (NULL == window_imp)
+ LL_DEBUGS("Window") << "No window implementation to handle message with, message code: " << U32(u_msg) << LL_ENDL;
+ }
// pass unhandled messages down to Windows
return DefWindowProc(h_wnd, u_msg, w_param, l_param);