From 5a63a0f10ad035389090f718ce82b28b799684f6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Mar 2006 15:59:32 +0000 Subject: [PATCH] fixed centering of a TLW on a non-TLW parent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/toplvcmn.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index c519fbc7c9..c9a8315776 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -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 {