summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llwindowwin32.cpp24
-rw-r--r--indra/newview/llviewerwindow.cpp1
2 files changed, 21 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 2ad6f7c8b5..9fa07d1d34 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1101,7 +1101,14 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
mhInstance,
NULL);
- LL_INFOS("Window") << "window is created." << LL_ENDL ;
+ if (mWindowHandle)
+ {
+ LL_INFOS("Window") << "window is created." << LL_ENDL ;
+ }
+ else
+ {
+ LL_WARNS("Window") << "Window creation failed, code: " << GetLastError() << LL_ENDL;
+ }
//-----------------------------------------------------------------------
// Create GL drawing context
@@ -1416,7 +1423,16 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
mhInstance,
NULL);
- LL_INFOS("Window") << "recreate window done." << LL_ENDL ;
+
+ if (mWindowHandle)
+ {
+ LL_INFOS("Window") << "recreate window done." << LL_ENDL ;
+ }
+ else
+ {
+ // Note: if value is NULL GetDC retrieves the DC for the entire screen.
+ LL_WARNS("Window") << "Window recreation failed, code: " << GetLastError() << LL_ENDL;
+ }
if (!(mhDC = GetDC(mWindowHandle)))
{
@@ -2646,20 +2662,20 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_SETFOCUS:
- window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETFOCUS");
if (gDebugWindowProc)
{
LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL;
}
+ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETFOCUS");
window_imp->mCallbacks->handleFocus(window_imp);
return 0;
case WM_KILLFOCUS:
- window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KILLFOCUS");
if (gDebugWindowProc)
{
LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL;
}
+ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KILLFOCUS");
window_imp->mCallbacks->handleFocusLost(window_imp);
return 0;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ca231c164c..74deaffe16 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2268,6 +2268,7 @@ void LLViewerWindow::shutdownGL()
LLViewerWindow::~LLViewerWindow()
{
LL_INFOS() << "Destroying Window" << LL_ENDL;
+ gDebugWindowProc = TRUE; // event catching, at this point it shouldn't output at all
destroyWindow();
delete mDebugText;