]> git.saurik.com Git - wxWidgets.git/commitdiff
SetInitialFrameRect: use frameRect.size.height to calculate frameRect.origin.y
authorDavid Elliott <dfe@tgwbd.org>
Mon, 18 Aug 2003 19:21:32 +0000 (19:21 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Mon, 18 Aug 2003 19:21:32 +0000 (19:21 +0000)
Fixes bug where size.y!=frameRect.size.height (e.g. it is -1)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/window.mm

index 0aa235830ff5cd042fcfb39c9a9695558ff4d454..1ef455d8105f67a6b88e71ee53249e46595ce993 100644 (file)
@@ -522,7 +522,7 @@ void wxWindowCocoa::SetInitialFrameRect(const wxPoint& pos, const wxSize& size)
     if(size.y!=-1)
         frameRect.size.height = size.y;
     frameRect.origin.x = pos.x;
-    frameRect.origin.y = parentRect.size.height-(pos.y+size.y);
+    frameRect.origin.y = parentRect.size.height-(pos.y+frameRect.size.height);
     [nsview setFrame: frameRect];
 }