]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
adding core services and increase Universal Header min req
[wxWidgets.git] / src / os2 / window.cpp
index 977e27bc94ac7f9f0542c2bad5c095f97c28d213..7458e0eb703120c837ad4af39e8e5ef949e1798f 100644 (file)
@@ -1623,12 +1623,19 @@ void wxWindowOS2::DoMoveWindow(
                               ,vSwpScroll.cy - nAdjustHeight
                               ,SWP_MOVE | SWP_SIZE
                              );
                               ,vSwpScroll.cy - nAdjustHeight
                               ,SWP_MOVE | SWP_SIZE
                              );
-            nYDiff += nAdjustHeight;
+            nYDiff -= nAdjustHeight;
         }
         MoveChildren(nYDiff);
         ::WinQueryWindowPos(GetHwnd(), &m_vWinSwp);
     }
         }
         MoveChildren(nYDiff);
         ::WinQueryWindowPos(GetHwnd(), &m_vWinSwp);
     }
+#if 0
+    // FIXME: By my logic, the next line should be needed as it moves child
+    //        windows when resizing the parent (see comment at beginning of
+    //       function). However, this seems to cause lots of problems. At
+    //        least, e.g. the grid sample almost works with this line
+    //        commented out but crashes badly with it. 
     MoveChildren(nHeightDelta);
     MoveChildren(nHeightDelta);
+#endif
 } // end of wxWindowOS2::DoMoveWindow
 
 //
 } // end of wxWindowOS2::DoMoveWindow
 
 //
@@ -4416,6 +4423,10 @@ void wxWindowOS2::MoveChildren(
             ::WinQueryWindowPos( GetHwndOf(pWin)
                                 ,&vSwp
                                );
             ::WinQueryWindowPos( GetHwndOf(pWin)
                                 ,&vSwp
                                );
+            // Actually, only move children that already are placed on the
+            // frame, not ones which are still at wxDefaultCoord.
+            if (vSwp.y == wxDefaultCoord)
+                continue;
             if (pWin->IsKindOf(CLASSINFO(wxControl)))
             {
                 wxControl*          pCtrl;
             if (pWin->IsKindOf(CLASSINFO(wxControl)))
             {
                 wxControl*          pCtrl;