From a82940197dbf417f5500d20f61b0d41b280c3b1a Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Fri, 10 Oct 2014 19:47:58 +0000 Subject: [PATCH] Comments, and cleaned up a piece of dead code. --- src/widgets/MultiDialog.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/widgets/MultiDialog.cpp b/src/widgets/MultiDialog.cpp index 8477b1657..2ea68305e 100644 --- a/src/widgets/MultiDialog.cpp +++ b/src/widgets/MultiDialog.cpp @@ -146,6 +146,9 @@ int ShowMultiDialog(wxString message, const wxChar **buttons, wxString boxMsg, bool log) { wxWindow * pParent = wxGetApp().GetTopWindow(); + + // We want a parent we can display over, so don't make it a parent if top + // window is a STAY_ON_TOP. if (pParent) { if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP) pParent = NULL; @@ -157,9 +160,14 @@ int ShowMultiDialog(wxString message, dlog.CentreOnParent(); else { dlog.CenterOnScreen(); - wxPoint Pos = dlog.GetPosition() + wxPoint(-300, -10); + // and after centring move the dialog left by the size of the dialog. + // Likely to help if we have the splash screen visible, or if + // we're spanning two equally sized monitors. + // Unlikely to make things worse. + wxSize Size = dlog.GetSize(); + Size.SetHeight( 10 ); + wxPoint Pos = dlog.GetPosition() -Size; dlog.Move(Pos); - dlog; } return dlog.ShowModal(); }