From da386c3119661c69b54e9af0c2b298078b4f9dda Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Oct 2025 14:02:00 +0000 Subject: [PATCH] Close splash screen before loading connections to fix password dialog z-order Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com> --- mRemoteNG/UI/Forms/frmMain.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mRemoteNG/UI/Forms/frmMain.cs b/mRemoteNG/UI/Forms/frmMain.cs index 78919105..08c6e1c8 100644 --- a/mRemoteNG/UI/Forms/frmMain.cs +++ b/mRemoteNG/UI/Forms/frmMain.cs @@ -216,6 +216,14 @@ namespace mRemoteNG.UI.Forms Runtime.ConnectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded; Runtime.ConnectionsService.ConnectionsSaved += ConnectionsServiceOnConnectionsSaved; + + // Close splash screen before loading connections to ensure password dialog appears on top + FrmSplashScreenNew splash = FrmSplashScreenNew.GetInstance(); + if (splash.Dispatcher.CheckAccess()) + splash.Close(); + else + splash.Dispatcher.Invoke(() => splash.Close()); + CredsAndConsSetup credsAndConsSetup = new(); credsAndConsSetup.LoadCredsAndCons(); @@ -234,12 +242,6 @@ namespace mRemoteNG.UI.Forms pnlDock.ShowDocumentIcon = true; - FrmSplashScreenNew splash = FrmSplashScreenNew.GetInstance(); - if (splash.Dispatcher.CheckAccess()) - splash.Close(); - else - splash.Dispatcher.Invoke(() => splash.Close()); - if (Properties.OptionsStartupExitPage.Default.StartMinimized) { WindowState = FormWindowState.Minimized;