X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f464296deff25be95f9e2b7c68566919aa17da2..6c5d62917d14278d8925a73d754965713e11e32f:/src/common/toplvcmn.cpp?ds=sidebyside diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index f69ac1e021..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 { @@ -288,9 +289,12 @@ bool wxTopLevelWindowBase::SendIconizeEvent(bool iconized) // do the window-specific processing after processing the update event void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) { - if ( event.GetSetEnabled() ) - Enable(event.GetEnabled()); + // call inherited, but skip the wxControl's version, and call directly the + // wxWindow's one instead, because the only reason why we are overriding this + // function is that we want to use SetTitle() instead of wxControl::SetLabel() + wxWindowBase::DoUpdateWindowUI(event); + // update title if ( event.GetSetText() ) { if ( event.GetText() != GetTitle() )