]> git.saurik.com Git - wxWidgets.git/commitdiff
toplevel creation respecting wxDefaultPosition again
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 9 Nov 2004 20:03:19 +0000 (20:03 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 9 Nov 2004 20:03:19 +0000 (20:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp

index a794c8077a97fb7a70162569e2faee6c6221cf52..a459279ecc332ee2b3f7f4c4aad56a5c3326317c 100644 (file)
@@ -948,6 +948,14 @@ void  wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
 
     int x = (int)pos.x;
     int y = (int)pos.y;
+    
+    wxRect display = wxGetClientDisplayRect() ;
+
+    if ( x == wxDefaultPosition.x )
+        x = display.x ;
+    
+    if ( y == wxDefaultPosition.y )
+        y = display.y ;
 
     int w = WidthDefault(size.x);
     int h = HeightDefault(size.y);