diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-12 20:08:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-12 20:08:02 +0300 |
commit | c951935ab25197ce7c58716a339a010ba028f8e4 (patch) | |
tree | 352592209983a598fc318c05c1c17d3adb7b77bc | |
parent | 78f4e3d07a8d405e642bec6a40e74d57fe9073c6 (diff) |
fixes #796 (Double-clicking contact list entry no longer activates their window)
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 2e8d5752e0..5944e33f7d 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -115,9 +115,17 @@ INT_PTR SendMessageCmd(MCONTACT hContact, wchar_t *pwszInitialText) SendDlgItemMessageW(hwnd, IDC_SRMM_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)pwszInitialText);
mir_free(pwszInitialText);
}
- ShowWindow(hwnd, SW_RESTORE);
- SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
- SetForegroundWindow(hwnd);
+
+ if (!g_Settings.bTabsEnable) {
+ HWND hwndContainer = GetParent(hwnd);
+ ShowWindow(hwndContainer, SW_RESTORE);
+ SetWindowPos(hwndContainer, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
+ SetForegroundWindow(hwndContainer);
+ }
+ else {
+ CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ pDialog->m_tab.ActivatePage(pDialog->m_tab.GetDlgIndex(pDlg));
+ }
}
else GetContainer()->AddPage(hContact, pwszInitialText, false);
|