diff options
-rw-r--r-- | plugins/Tabsrmm/src/hotkeyhandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Tabsrmm/src/hotkeyhandler.cpp b/plugins/Tabsrmm/src/hotkeyhandler.cpp index 98ab4172f9..d203e2fd4d 100644 --- a/plugins/Tabsrmm/src/hotkeyhandler.cpp +++ b/plugins/Tabsrmm/src/hotkeyhandler.cpp @@ -285,6 +285,10 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (IsIconic(pLastActiveContainer->hwnd) || !IsWindowVisible(pLastActiveContainer->hwnd)) {
SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(pLastActiveContainer->hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
+ } else if (GetForegroundWindow() != pLastActiveContainer->hwnd) {
+ SetForegroundWindow(pLastActiveContainer->hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
} else {
if(PluginConfig.m_HideOnClose)
ShowWindow(pLastActiveContainer->hwnd, SW_HIDE);
@@ -529,7 +533,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP CSkin::initAeroEffect();
break;
}
-
+
/*
* user has changed the visual style or switched to/from
* classic Windows theme
|