From bc2b0c1b2b44c597aa9fa9214cc4237a6c5740e1 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 26 Mar 2005 05:39:33 +0000 Subject: [PATCH] correcting DoGetPosition for windows with borders git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 57e5d8f59d..07696993a6 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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(); -- 2.45.2