]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid negative widths
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Feb 2005 13:45:33 +0000 (13:45 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Feb 2005 13:45:33 +0000 (13:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index e0624a598e5aede90212c862a0fb7d40bbaab9c3..f5de5375af95ce96e55faa94f7c98834d98a2a8d 100644 (file)
@@ -1769,8 +1769,8 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height)
         former_y += pt.y ;
     }
 
-    int actualWidth = width;
-    int actualHeight = height;
+    int actualWidth = wxMax( width , 0 ) ;
+    int actualHeight = wxMax( height , 0 ) ;
     int actualX = x;
     int actualY = y;
 
@@ -1781,7 +1781,7 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height)
     if ((m_maxWidth != -1) && (actualWidth > m_maxWidth))
         actualWidth = m_maxWidth;
     if ((m_maxHeight != -1) && (actualHeight > m_maxHeight))
-        actualHeight = m_maxHeight;
+        actualHeight = m_maxHeight;    
 
     bool doMove = false ;
     bool doResize = false ;