diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-20 19:29:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-20 19:29:01 +0000 |
commit | cb433a48f6562a49695f77ea2e39f8a5592c8822 (patch) | |
tree | 10cd7fc84014b0fc8a298fef9d8638ab3f45368b /plugins/TabSRMM/src/mim.cpp | |
parent | bb6aa9cc3c864059ac20849cdac413c827fbd5a0 (diff) |
disabling metacontacts: fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@8668 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/mim.cpp')
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index d7fc9f7b20..53dcd6aa31 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -491,12 +491,14 @@ int CMimAPI::PrebuildContactMenu(WPARAM hContact, LPARAM lParam) * improve the overall responsiveness when receiving messages.
*/
-int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam)
+int CMimAPI::DispatchNewEvent(WPARAM hContact, LPARAM lParam)
{
- if (wParam) {
- HWND h = M.FindWindow(wParam);
+ if (hContact) {
+ HWND h = M.FindWindow(hContact);
+ if (h == NULL)
+ h = M.FindWindow(hContact = db_event_getContact((HANDLE)lParam));
if (h)
- PostMessage(h, HM_DBEVENTADDED, wParam, lParam); // was SENDMESSAGE !!! XXX
+ PostMessage(h, HM_DBEVENTADDED, hContact, lParam); // was SENDMESSAGE !!! XXX
}
return 0;
}
@@ -520,6 +522,8 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM lParam) db_event_get(hDbEvent, &dbei);
HWND hwnd = M.FindWindow(hContact);
+ if (hwnd == NULL)
+ hwnd = M.FindWindow(hContact = db_event_getContact(hDbEvent));
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
BOOL isShownCustomEvent = DbEventIsForMsgWindow(&dbei);
|