]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/frame.cpp
added missing return on error
[wxWidgets.git] / src / os2 / frame.cpp
index c1602dff0a3dc33a69965b5ea537c0081563350d..838197f4d40cb3df3eb1d6b03c085c9500d8782a 100644 (file)
@@ -243,18 +243,13 @@ void wxFrame::DoGetClientSize(
 {
     RECTL                           vRect;
     ::WinQueryWindowRect(GetHwnd(), &vRect);
 {
     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)
     if (pX)
         *pX = vRect.xRight - vRect.xLeft;
     if (pY)
@@ -346,15 +341,9 @@ void wxFrame::DoGetPosition(
     POINTL                          vPoint;
 
     ::WinQueryWindowRect(m_hFrame, &vRect);
     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
 
 // ----------------------------------------------------------------------------
 } // end of wxFrame::DoGetPosition
 
 // ----------------------------------------------------------------------------
@@ -1361,6 +1350,7 @@ bool wxFrame::HandleSize(
             // restore all child frames too
             //
             IconizeChildFrames(FALSE);
             // restore all child frames too
             //
             IconizeChildFrames(FALSE);
+            (void)SendIconizeEvent(FALSE);
 
             //
             // fall through
 
             //
             // fall through
@@ -1375,6 +1365,7 @@ bool wxFrame::HandleSize(
             // Iconize all child frames too
             //
             IconizeChildFrames(TRUE);
             // Iconize all child frames too
             //
             IconizeChildFrames(TRUE);
+            (void)SendIconizeEvent();
             m_bIconized = TRUE;
             break;
     }
             m_bIconized = TRUE;
             break;
     }