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.cpp49
1 files changed, 31 insertions, 18 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 164133b5eb..3da41af7d2 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -733,6 +733,7 @@ LLWindowWin32::~LLWindowWin32()
void LLWindowWin32::show()
{
+ LL_DEBUGS("Window") << "Setting window to show" << LL_ENDL;
ShowWindow(mWindowHandle, SW_SHOW);
SetForegroundWindow(mWindowHandle);
SetFocus(mWindowHandle);
@@ -1145,6 +1146,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,
@@ -1960,6 +1967,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)
{
@@ -2002,9 +2011,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)
@@ -2060,7 +2069,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)
@@ -2111,7 +2120,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)
@@ -2183,7 +2192,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)
@@ -2209,7 +2218,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)
@@ -2225,9 +2234,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)
{
@@ -2238,7 +2247,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;
}
@@ -2251,7 +2260,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;
}
@@ -2263,7 +2272,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;
}
@@ -2276,7 +2285,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;
}
@@ -2307,7 +2316,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)
@@ -2750,7 +2759,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 );
@@ -2825,7 +2834,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;
}
@@ -2834,7 +2843,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;
}
@@ -2866,7 +2875,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;
}
@@ -2876,7 +2885,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);