diff --git a/checkin_notes b/checkin_notes index 4053e4a397..11ec3c95a6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1814,3 +1814,11 @@ Charlie 17 Feb 2012 client/ coproc_detect.cpp + +Charlie 18 Feb 2012 + - MGR: Fix a Mac-only bug which showed Event Log if About BOINC is selected + from task bar menu when BOINC is hidden. + + clientgui/ + BOINCGUIApp.cpp + BOINCTaskBar.cpp diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index a22e32c334..874b6c5069 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -789,18 +789,19 @@ int CBOINCGUIApp::IdleTrackerDetach() { void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) { +#ifdef __WXMAC__ + // Make sure any modal dialog (such as Attach Wizard) ends up in front. + if (IsModalDialogDisplayed()) { + event.Skip(); + return; + } +#endif + if (event.GetActive()) { if (m_pEventLog && !m_pEventLog->IsIconized()) { m_pEventLog->Raise(); } m_pFrame->Raise(); - -#ifdef __WXMAC__ - // Make sure any modal dialog (such as Attach Wizard) ends up in front. - if (IsModalDialogDisplayed()) { - wxDynamicCast(wxWindow::FindWindowById(ID_ANYDIALOG), wxDialog)->Raise(); - } -#endif } event.Skip(); } diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index 01e45bff88..d448f32d76 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -248,9 +248,17 @@ void CTaskBarIcon::OnSuspendResumeGPU(wxCommandEvent& WXUNUSED(event)) { } void CTaskBarIcon::OnAbout(wxCommandEvent& WXUNUSED(event)) { - bool bWasVisible; + bool bWasVisible = wxGetApp().IsApplicationVisible(); +#ifdef __WXMAC__ + bool bEventLogWasShown = false; - bWasVisible = wxGetApp().IsApplicationVisible(); + CDlgEventLog* eventLog = wxGetApp().GetEventLog(); + if (eventLog) { + bEventLogWasShown = eventLog->IsShown(); + if (bEventLogWasShown && !bWasVisible) eventLog->Show(false); + } +#endif + wxGetApp().ShowApplication(true); ResetTaskBar(); @@ -261,6 +269,10 @@ void CTaskBarIcon::OnAbout(wxCommandEvent& WXUNUSED(event)) { if (!bWasVisible) { wxGetApp().ShowApplication(false); } + +#ifdef __WXMAC__ + if (bEventLogWasShown) eventLog->Show(true); +#endif }