]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed centering of a TLW on a non-TLW parent
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Mar 2006 15:59:32 +0000 (15:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Mar 2006 15:59:32 +0000 (15:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/toplvcmn.cpp

index c519fbc7c9005e0c8fdfc28c2a347a2ae1725643..c9a83157763d40141c110784289d035360c0f16f 100644 (file)
@@ -158,8 +158,9 @@ void wxTopLevelWindowBase::DoCentre(int dir)
     wxRect rectCentre;
     if ( !(dir & wxCENTRE_ON_SCREEN) && GetParent() )
     {
-        // centre on parent window
-        rectCentre = GetParent()->GetRect();
+        // centre on parent window: notice that we need screen coordinates for
+        // positioning this TLW
+        rectCentre = GetParent()->GetScreenRect();
     }
     else
     {