X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/adebd2d72c8897f30bd9e673d1e16ef2794d72ab..29149a64916d6fdc53e445adca9ef83bc58fb6c3:/src/os2/frame.cpp diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 67201d59d7..838197f4d4 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -243,18 +243,13 @@ void wxFrame::DoGetClientSize( { RECTL vRect; ::WinQueryWindowRect(GetHwnd(), &vRect); -#if wxUSE_STATUSBAR - if ( GetStatusBar() && GetStatusBar()->IsShown() ) - { - int nStatusX; - int nStatusY; - GetStatusBar()->GetClientSize( &nStatusX - ,&nStatusY - ); - vRect.yBottom += nStatusY; - } -#endif // wxUSE_STATUSBAR + // + // No need to use statusbar code as in WIN32 as the FORMATFRAME + // window procedure ensures PM knows about the new frame client + // size internally. A ::WinQueryWindowRect is all that is needed! + // + if (pX) *pX = vRect.xRight - vRect.xLeft; if (pY) @@ -346,15 +341,9 @@ void wxFrame::DoGetPosition( POINTL vPoint; ::WinQueryWindowRect(m_hFrame, &vRect); - vPoint.x = vRect.xLeft; - - // - // OS/2 is backwards [WIN32 it is vRect.yTop] - // - vPoint.y = vRect.yBottom; - *pX = vPoint.x; - *pY = vPoint.y; + *pX = vRect.xRight - vRect.xLeft; + *pY = vRect.yTop - vRect.yBottom; } // end of wxFrame::DoGetPosition // ---------------------------------------------------------------------------- @@ -1192,12 +1181,12 @@ void wxFrame::PositionToolBar() } #endif // wxUSE_STATUSBAR - if ( GetToolBar() ) + if ( m_frameToolBar ) { int nToolbarWidth; int nToolbarHeight; - GetToolBar()->GetSize( &nToolbarWidth + m_frameToolBar->GetSize( &nToolbarWidth ,&nToolbarHeight ); @@ -1361,6 +1350,7 @@ bool wxFrame::HandleSize( // restore all child frames too // IconizeChildFrames(FALSE); + (void)SendIconizeEvent(FALSE); // // fall through @@ -1375,6 +1365,7 @@ bool wxFrame::HandleSize( // Iconize all child frames too // IconizeChildFrames(TRUE); + (void)SendIconizeEvent(); m_bIconized = TRUE; break; }