diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 520d3626..34e7562e 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -8,6 +8,7 @@ Fixes: ------ #1181: Connections sometimes dont immediately load when switching to sql feature #1173: Fixed memory leak when loading connections multiple times +#1168: Autohide Connection and Config tab won't open when ssh connection active #1134: Fixed issue where opening a connection opens same connection on other clients when using database feature #449: Encrypt passwords saved to database diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index 4be80b35..bb213821 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -429,7 +429,8 @@ namespace mRemoteNG.UI.Forms // Only handle this msg if it was triggered by a click if (NativeMethods.LOWORD(m.WParam) == NativeMethods.WA_CLICKACTIVE) { - var controlThatWasClicked = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition)); + var controlThatWasClicked = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition)) + ?? GetChildAtPoint(MousePosition); if (controlThatWasClicked != null) { if (controlThatWasClicked is TreeView || @@ -444,9 +445,14 @@ namespace mRemoteNG.UI.Forms controlThatWasClicked is Crownwood.Magic.Controls.TabControl || controlThatWasClicked is Crownwood.Magic.Controls.InertButton) { - // Simulate a mouse event since one wasn't generated by Windows - SimulateClick(controlThatWasClicked); - controlThatWasClicked.Focus(); + // Simulate a mouse event since one wasn't generated by Windows + SimulateClick(controlThatWasClicked); + controlThatWasClicked.Focus(); + } + else if (controlThatWasClicked is AutoHideStripBase) + { + // only focus the autohide toolstrip + controlThatWasClicked.Focus(); } else {