diff --git a/checkin_notes b/checkin_notes index 0fda0df676..8fc2410e81 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6286,3 +6286,14 @@ David 6 May 2005 html/user/ edit_user_info_action.php + +Charlie 7 May 2005 +Mac: Fix problems with window position & size caused by +calling Maximize(false). If m_bFrameVisible-visible is +false at startup, don't show & hide window (to eliminate +annoying flash of window). + + clientgui/ + BOINCGUIApp.cpp + BOINCTaskBar.cpp + MainFrame.cpp diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index a1c7187b2f..db1ad2dfd6 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -220,8 +220,10 @@ bool CBOINCGUIApp::OnInit() { if (m_bFrameVisible) { m_pFrame->Show(); } else { +#ifndef __WXMAC__ m_pFrame->Show(); m_pFrame->Show(false); +#endif } return true; diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index 4135157f51..a890b15d58 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -116,11 +116,13 @@ void CTaskBarIcon::OnOpen(wxCommandEvent& WXUNUSED(event)) { if (pFrame) { pFrame->Show(); +#ifndef __WXMAC__ if (pFrame->IsMaximized()) { pFrame->Maximize(true); } else { pFrame->Maximize(false); } +#endif pFrame->SendSizeEvent(); #ifdef __WXMSW__ diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index c96326d41b..6dd6aaf9e0 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -677,12 +677,6 @@ bool CMainFrame::RestoreState() { pConfig->Read(wxT("Width"), &iWidth, 800); pConfig->Read(wxT("Height"), &iHeight, 600); - SetSize(-1, -1, iWidth, iHeight); - Iconize(bWindowIconized); -#if defined(__WXMSW__) || defined(__WXMAC__) - Maximize(bWindowMaximized); -#endif - #ifdef __WXMAC__ pConfig->Read(wxT("YPos"), &iTop, 30); pConfig->Read(wxT("XPos"), &iLeft, 30); @@ -703,15 +697,14 @@ bool CMainFrame::RestoreState() { DisposeRgn(menuRgn); DisposeRgn(displayRgn); - SetPosition(wxPoint(iLeft, iTop)); - // The following line of code works around an apparent bug in - // the Macintosh version of wxWidgets which fails to set the - // window size and position, though the Windows version does so. - // It appears that SetSize() and SetPosition() don't set their - // corresponding instance variables on the Macintosh, but - // wxTopLevelWindowMac::DoMoveWindow() does successfully set - // these instance variables as well as actually adjust the window. - wxTopLevelWindowMac::DoMoveWindow(iLeft, iTop, iWidth, iHeight); + SetSize(iLeft, iTop, iWidth, iHeight); +#else // ! __WXMAC__ + SetSize(-1, -1, iWidth, iHeight); + Iconize(bWindowIconized); +#endif + +#ifdef __WXMSW__ + Maximize(bWindowMaximized); #endif //