summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-18 23:03:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-18 23:03:19 +0000
commit7984eb187eec59c96ce661e85575ee2cbf5b386e (patch)
tree229e23741f01ec046aa70e47fe929e5367d0b989 /plugins
parentf29f8fa4cfac6747af6b1d0699f7cb209e71c7d0 (diff)
fix for setting focus in tabSRMM
git-svn-id: http://svn.miranda-ng.org/main/trunk@65 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Tabsrmm/src/hotkeyhandler.cpp6
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