From 08098134c82a7b02304b95e0af85758daf7fb44f Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 13 Apr 2006 04:21:23 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9868 --- client/win/win_screensaver.cpp | 22 +++++++++++++++------- client/win/win_screensaver.h | 3 ++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/client/win/win_screensaver.cpp b/client/win/win_screensaver.cpp index 9e09f2957e..0d0fc777e2 100755 --- a/client/win/win_screensaver.cpp +++ b/client/win/win_screensaver.cpp @@ -267,7 +267,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) { m_bWaitForInputIdle = TRUE; // Post a message to mark the end of the initial group of window messages - PostMessage(m_hWnd, WM_USER, 0, 0); + PostMessage(m_hWnd, WM_SETTIMER, 0, 0); MSG msg; while(m_bWaitForInputIdle) { @@ -1414,13 +1414,8 @@ LRESULT CScreensaver::SaverProc( #endif switch (uMsg) { - case WM_USER: - // All initialization messages have gone through. Allow - // 500ms of idle time, then proceed with initialization. - SetTimer(hWnd, 1, 500, NULL); - break; - case WM_TIMER: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_TIMER\n")); switch (wParam) { case 1: // Initial idle time is done, proceed with initialization. @@ -1467,6 +1462,7 @@ LRESULT CScreensaver::SaverProc( break; case WM_MOUSEMOVE: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_MOUSEMOVE\n")); if (m_SaverMode != sm_test) { static INT xPrev = -1; static INT yPrev = -1; @@ -1487,6 +1483,7 @@ LRESULT CScreensaver::SaverProc( case WM_LBUTTONDOWN: case WM_RBUTTONDOWN: case WM_MBUTTONDOWN: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_KEYDOWN | WM_LBUTTONDOWN | WM_RBUTTONDOWN | WM_MBUTTONDOWN\n")); if (m_SaverMode != sm_test) { InterruptSaver(); } @@ -1515,6 +1512,7 @@ LRESULT CScreensaver::SaverProc( break; case WM_SETCURSOR: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_SETCURSOR\n")); if (m_SaverMode == sm_full && !m_bCheckingSaverPassword) { // Hide cursor SetCursor(NULL); @@ -1523,10 +1521,20 @@ LRESULT CScreensaver::SaverProc( break; case WM_POWERBROADCAST: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_POWERBROADCAST\n")); if (wParam == PBT_APMQUERYSUSPEND && gspfnMyVerifyPwdProc == NULL) InterruptSaver(); break; + + case WM_SETTIMER: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_SETTIMER\n")); + // All initialization messages have gone through. Allow + // 500ms of idle time, then proceed with initialization. + SetTimer(hWnd, 1, 500, NULL); + break; + case WM_INTERRUPTSAVER: + BOINCTRACE(_T("CScreensaver::SaverProc Received WM_INTERRUPTSAVER\n")); if (hWnd == m_Monitors[0].hWnd) { InterruptSaver(); } diff --git a/client/win/win_screensaver.h b/client/win/win_screensaver.h index 644477764d..574d9268c6 100644 --- a/client/win/win_screensaver.h +++ b/client/win/win_screensaver.h @@ -35,7 +35,8 @@ #define NO_MONITOR 0xffffffff #define BSF_ALLOWSFW 0x00000080 -#define WM_INTERRUPTSAVER WM_USER+1 +#define WM_SETTIMER WM_USER+1 +#define WM_INTERRUPTSAVER WM_USER+2 #define BOINC_WINDOW_CLASS_NAME _T("BOINC_app")