diff --git a/api/boinc_api.C b/api/boinc_api.C index 88159d763d..481a1d292b 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -515,6 +515,18 @@ int resume_activities() { return 0; } +// this can be called from the graphics thread +// +int restore_activities() { + int retval; + if (boinc_status.suspended) { + retval = suspend_activities(); + } else { + retval = resume_activities(); + } + return retval; +} + static void handle_heartbeat_msg() { char buf[MSG_CHANNEL_SIZE]; if (app_client_shm->shm->heartbeat.get_msg(buf)) { diff --git a/api/boinc_api.h b/api/boinc_api.h index ccb7b6ad87..8d148a1798 100755 --- a/api/boinc_api.h +++ b/api/boinc_api.h @@ -119,6 +119,7 @@ extern void block_sigalrm(); #endif extern int suspend_activities(void); extern int resume_activities(void); +extern int restore_activities(void); extern int boinc_init_options_general(BOINC_OPTIONS& opt); extern int set_worker_timer(void); extern void (*stop_graphics_thread_ptr)(); diff --git a/api/windows_opengl.C b/api/windows_opengl.C index ef9d509532..643569236d 100755 --- a/api/windows_opengl.C +++ b/api/windows_opengl.C @@ -378,7 +378,7 @@ LRESULT CALLBACK WndProc( } if (PBT_APMQUERYSUSPENDFAILED == wParam || PBT_APMRESUMESUSPEND == wParam) { set_mode(acked_graphics_mode); - resume_activities(); + restore_activities(); return TRUE; } if (PBT_APMQUERYSUSPEND == wParam) { diff --git a/checkin_notes b/checkin_notes index 08dc5542d4..525d01aaa1 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2487,3 +2487,15 @@ David 1 Mar 2006 client/ acct_mgr.C hostinfo_unix.C + +Rom 2 Mar 2006 + - Bug Fix: When Windows resumes from hibernation return the application to + it's previously desired state instead of blindly resuming it. + - Bug Fix: Copy all the project data except the master_url for each project + status update. + + api/ + boinc_api.C, .h + windows_opengl.C + lib/ + gui_rpc_client_ops.C diff --git a/lib/gui_rpc_client_ops.C b/lib/gui_rpc_client_ops.C index 856cee6ab1..66a749926f 100644 --- a/lib/gui_rpc_client_ops.C +++ b/lib/gui_rpc_client_ops.C @@ -83,6 +83,9 @@ void PROJECT::get_name(std::string& s) { void PROJECT::copy(PROJECT& p) { resource_share = p.resource_share; + project_name = p.project_name; + user_name = p.user_name; + team_name = p.team_name; user_total_credit = p.user_total_credit; user_expavg_credit = p.user_expavg_credit; host_total_credit = p.host_total_credit; @@ -97,6 +100,7 @@ void PROJECT::copy(PROJECT& p) { non_cpu_intensive = p.non_cpu_intensive; suspended_via_gui = p.suspended_via_gui; dont_request_more_work = p.dont_request_more_work; + tentative = p.tentative; scheduler_rpc_in_progress = p.scheduler_rpc_in_progress; attached_via_acct_mgr = p.attached_via_acct_mgr; gui_urls = p.gui_urls;