From 8b14ac035925a66e31996ef0fa1df2f05d206e8b Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 15 May 2017 10:45:49 +0100 Subject: [PATCH] Bug 718 - On dual monitors the splash screen is positioned incorrectly --- src/AudacityApp.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 16196f9f7..f16d25058 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1508,15 +1508,26 @@ bool AudacityApp::OnInit() AudacityProject *project; { + // Bug 718: Position splash screen on same screen + // as where Audacity project will appear. + wxRect wndRect; + bool bMaximized = false; + bool bIconized = false; + GetNextWindowPlacement(&wndRect, &bMaximized, &bIconized); + wxSplashScreen temporarywindow( logo, - wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, + wxSPLASH_NO_CENTRE | wxSPLASH_NO_TIMEOUT, 0, NULL, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP); + // Possibly move it on to the second screen... + temporarywindow.SetPosition( wndRect.GetTopLeft() ); + // Centered on whichever screen it is on. + temporarywindow.Center(); temporarywindow.SetTitle(_("Audacity is starting up...")); SetTopWindow(&temporarywindow);