X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d483828d77426eed11fa19c3f2f318383a118dc..4b7b750dd1ffd0d26b78728adb613b282a37c058:/src/os2/frame.cpp?ds=sidebyside diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index c1602dff0a..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 0 // not needed for OS/2 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 // ---------------------------------------------------------------------------- @@ -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; }