From cb433a48f6562a49695f77ea2e39f8a5592c8822 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Mar 2014 19:29:01 +0000 Subject: disabling metacontacts: fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8668 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/mim.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM/src') 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); -- cgit v1.2.3