*** empty log message ***

svn path=/trunk/boinc/; revision=4587
This commit is contained in:
Rom Walton 2004-11-18 04:09:10 +00:00
parent e5c7861518
commit dd3a9d06c9
4 changed files with 25 additions and 17 deletions

View File

@ -196,23 +196,18 @@ static void set_mode(int mode) {
if (NULL == hInteractiveWindowStation) {
BOINCTRACE(_T("Failed to retrieve the required window station\n"));
} else {
BOINCTRACE(_T("Retrieved the required window station\n"));
hInteractiveDesktop = OpenDesktop(
graphics_msg.desktop, NULL, FALSE,
GENERIC_READ | DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW | DESKTOP_WRITEOBJECTS
GENERIC_READ | GENERIC_WRITE
);
if (NULL == hInteractiveDesktop) {
BOINCTRACE(_T("Failed to retrieve the required desktop\n"));
SetProcessWindowStation(hOriginalWindowStation);
SetThreadDesktop(hOriginalDesktop);
new_mode = MODE_UNSUPPORTED;
} else {
BOINCTRACE(_T("Retrieved the required desktop\n"));
SetProcessWindowStation(hInteractiveWindowStation);
SetThreadDesktop(hInteractiveDesktop);
}
}
}

View File

@ -25,6 +25,8 @@
#include "boinc_win.h"
#endif
#include "exception.h"
#include "diagnostics.h"
#include "client_state.h"
#include "client_msgs.h"
@ -62,7 +64,7 @@ void ACTIVE_TASK::check_graphics_mode_ack() {
if (!app_client_shm.shm) return;
if (app_client_shm.shm->graphics_reply.get_msg(buf)) {
app_client_shm.decode_graphics_msg(buf, gm);
//BOINCTRACE("got graphics ack %s for %s", buf, result->name);
BOINCTRACE("got graphics ack %s for %s\n", buf, result->name);
if (gm.mode != MODE_REREAD_PREFS) {
graphics_mode_acked = gm.mode;
}
@ -103,7 +105,7 @@ void ACTIVE_TASK_SET::save_app_modes() {
atp->graphics_mode_acked = MODE_HIDE_GRAPHICS;
}
atp->graphics_mode_before_ss = atp->graphics_mode_acked;
//BOINCTRACE("saved mode %d", atp->graphics_mode_acked);
BOINCTRACE("saved mode %d\n", atp->graphics_mode_acked);
}
}
@ -184,11 +186,11 @@ ACTIVE_TASK* CLIENT_STATE::get_next_graphics_capable_app() {
best_atp = atp;
}
if (best_atp) {
//BOINCTRACE("chose SS: %s", best_atp->result->name);
BOINCTRACE("chose SS: %s\n", best_atp->result->name);
return atp;
}
}
}
//BOINCTRACE("no SS to choose");
BOINCTRACE("no SS to choose\n");
return NULL;
}

View File

@ -770,8 +770,9 @@ LRESULT CScreensaver::PrimarySaverProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPA
return 0;
case 2:
int iReturnValue = 0;
int iStatus = 0;
HWND hwndBOINCAppWindow = NULL;
int iReturnValue = 0;
int iStatus = 0;
// Create a screen saver window on the primary display if the boinc client crashes
CreateSaverWindow();
@ -780,6 +781,13 @@ LRESULT CScreensaver::PrimarySaverProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPA
m_bErrorMode = FALSE;
m_hrError = 0;
hwndBOINCAppWindow = ::FindWindow( BOINC_WINDOW_CLASS_NAME, NULL );
if ( NULL != hwndBOINCAppWindow )
{
BOINCTRACE(_T("CScreensaver::PrimarySaverProc - BOINC Application Window Detected\n"));
::SetForegroundWindow( hwndBOINCAppWindow );
}
// Lets try and get the current state of the CC
if (m_bResetCoreState)
{

View File

@ -43,9 +43,12 @@
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
#define MAX_DISPLAYS 9
#define NO_ADAPTER 0xffffffff
#define NO_MONITOR 0xffffffff
#define MAX_DISPLAYS 9
#define NO_ADAPTER 0xffffffff
#define NO_MONITOR 0xffffffff
#define BOINC_WINDOW_CLASS_NAME "BOINC_app"
//***************************************************************************************