diff --git a/checkin_notes b/checkin_notes index 96378204a4..2083c2b874 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9426,3 +9426,13 @@ Charlie 10 Oct 2007 mac_build/ boinc.xcodeproj/ project.pbxproj + +Charlie 11 Oct 2007 + - V6 GFX: Fix bugs in graphics compatibility with V5 applications: + - Initialize APP_VERSION::graphics_exec_path to empty string. + - Remember previous graphics mode when setting V5 applications + to MODE_FULLSCREEN and restore mode when exiting fullscreen. + client/ + app.h + app_graphics.C + client_state.C diff --git a/client/app.h b/client/app.h index a197948019..45bf0cfa9c 100644 --- a/client/app.h +++ b/client/app.h @@ -116,6 +116,7 @@ public: // info related to app's graphics mode (win, screensaver, etc.) // int graphics_mode_acked; // mode acked by app + int graphics_mode_before_ss; // mode before last screensaver request double graphics_mode_ack_timeout; bool exit_requested; int premature_exit_count; diff --git a/client/app_graphics.C b/client/app_graphics.C index 916bf020a5..2d22b84d27 100644 --- a/client/app_graphics.C +++ b/client/app_graphics.C @@ -46,6 +46,18 @@ void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) { if (!app_client_shm.shm) return; + if (m.mode == MODE_FULLSCREEN) { + // Remember mode before screensaver + graphics_mode_before_ss = graphics_mode_acked; + } else if (graphics_mode_acked != MODE_FULLSCREEN) { + graphics_mode_before_ss = MODE_HIDE_GRAPHICS; + } + + if ( (m.mode == MODE_HIDE_GRAPHICS) && (graphics_mode_acked == MODE_FULLSCREEN) ) { + // Restore mode from before screensaver + m.mode = graphics_mode_before_ss; + } + graphics_msg = m; // save graphics_station, desktop, display strcpy(buf, xml_graphics_modes[m.mode]); diff --git a/client/client_state.C b/client/client_state.C index fd5d616a5f..b59e6156ed 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -731,6 +731,8 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) { ); return ERR_NOT_UNIQUE; } + + avp->graphics_exec_path[0] = 0; for (i=0; iapp_files.size(); i++) { FILE_REF& file_ref = avp->app_files[i];