]> git.saurik.com Git - wxWidgets.git/commitdiff
correcting DoGetPosition for windows with borders
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 26 Mar 2005 05:39:33 +0000 (05:39 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 26 Mar 2005 05:39:33 +0000 (05:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 57e5d8f59d33d99b5d7dbc3827d809336f541a1f..07696993a6d6f52c9adecc6f6664eb122f7315de 100644 (file)
@@ -1213,10 +1213,14 @@ void wxWindowMac::DoGetPosition(int *x, int *y) const
 {
     Rect bounds ;
     m_peer->GetRect( &bounds ) ;
-
+    
     int x1 = bounds.left ;
     int y1 = bounds.top ;
 
+    // get the wx window position from the native one
+    x1 -= MacGetLeftBorderSize() ;
+    y1 -= MacGetTopBorderSize() ;
+
     if ( !IsTopLevel() )
     {
         wxWindow *parent = GetParent();