diff --git a/mRemoteNG/UI/Window/ConnectionWindow.cs b/mRemoteNG/UI/Window/ConnectionWindow.cs index 786343306..eb99a600f 100644 --- a/mRemoteNG/UI/Window/ConnectionWindow.cs +++ b/mRemoteNG/UI/Window/ConnectionWindow.cs @@ -145,7 +145,8 @@ namespace mRemoteNG.UI.Window // Ensure the ConnectionWindow is visible before adding the tab // This prevents visibility issues when the window was created but not yet shown - if (!Visible) + // Check DockState instead of Visible to properly detect if window is shown in DockPanel + if (DockState == DockState.Unknown || DockState == DockState.Hidden || !Visible) { Show(FrmMain.Default.pnlDock, DockState.Document); }