summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/hotkeyhandler.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-04 19:53:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-04 19:53:21 +0300
commit2a00f9bf6c008f2e908a34fe040b6ab342884a82 (patch)
tree0e680942c405bed5605b00f22839e1a2b140cc27 /plugins/TabSRMM/src/hotkeyhandler.cpp
parentcf4bff42f8a3dbf18623d8df599849399a6165a7 (diff)
final fix for #2184
Diffstat (limited to 'plugins/TabSRMM/src/hotkeyhandler.cpp')
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 7cf463a8a9..9e9ee3f502 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -93,12 +93,10 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
if (hContact == 0)
return;
- HWND hWnd = Srmm_FindWindow(hContact);
- if (hWnd && IsWindow(hWnd)) {
- TContainerData *pContainer = nullptr;
- SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
- if (pContainer) {
- ActivateExistingTab(pContainer, hWnd);
+ auto *pDlg = Srmm_FindDialog(hContact);
+ if (pDlg && IsWindow(pDlg->GetHwnd())) {
+ if (TContainerData *pContainer = pDlg->m_pContainer) {
+ pDlg->ActivateTab();
pContainer->m_hwndSaved = nullptr;
SetForegroundWindow(pContainer->m_hwnd);
}