From cecb704abb7626fbab200f8d2151b1bba1d611c6 Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 9 Jun 2017 14:25:04 +0100 Subject: [PATCH] Stop splash screen position jumping (on single monitor) This is a new problem from Windows 10 Creator's update. The fix fixes it on single monitors, but on dual monitor it may appear first on the main monitor and then jump across. --- src/AudacityApp.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index f16d25058..8b3b900ef 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1517,13 +1517,21 @@ bool AudacityApp::OnInit() wxSplashScreen temporarywindow( logo, - wxSPLASH_NO_CENTRE | wxSPLASH_NO_TIMEOUT, + wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, NULL, wxID_ANY, - wxDefaultPosition, + wndRect.GetTopLeft(), wxDefaultSize, wxSTAY_ON_TOP); + + // Unfortunately with the Windows 10 Creators update, the splash screen + // now appears before setting its position. + // On a dual monitor screen it will appear on one screen and then + // possibly jump to the second. + // We could fix this by writing outr own splash screen and using Hide() + // until the splash scren was correctly positioned, then Show() + // Possibly move it on to the second screen... temporarywindow.SetPosition( wndRect.GetTopLeft() ); // Centered on whichever screen it is on.