From 4b8d06dfe84e9b71dda8b9ff137d527444c692d3 Mon Sep 17 00:00:00 2001 From: Camilo Alvarez Date: Tue, 29 Jan 2019 23:30:40 -0500 Subject: [PATCH] Improvement in protocol to tab focus Tabs are focused now when mouse is clicked inside of the connetiontab, before clicking inside ssh window, for example, will not highlight the tab. --- mRemoteV1/UI/Forms/frmMain.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index 89aa1b86..5f7393ef 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -438,6 +438,13 @@ namespace mRemoteNG.UI.Forms _inMouseActivate = true; break; case NativeMethods.WM_ACTIVATEAPP: + var candidateTabToFocus = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition)) + ?? GetChildAtPoint(MousePosition); + + if(candidateTabToFocus is InterfaceControl) + { + candidateTabToFocus.Parent.Focus(); + } _inMouseActivate = false; break; case NativeMethods.WM_ACTIVATE: