summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-16 12:57:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-16 12:57:09 +0300
commit12c0a01bc1826949fa9e146b668a400cab679a63 (patch)
tree2dc6768537cf0de4ce2a7a79b86c3a08f3c8af1e /plugins/Popup/src/services.cpp
parent40086f4fc370ca92218c805fe5cee10c09f57f2c (diff)
merge with master till
IRC fixes #1342 (broken search in channel browser);
Diffstat (limited to 'plugins/Popup/src/services.cpp')
-rw-r--r--plugins/Popup/src/services.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index d545d5ff9e..fab7339724 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -330,12 +330,13 @@ struct SafeUnhookEventParam
HANDLE hEvent;
};
-static void CALLBACK SafeUnhookEventFunc(ULONG_PTR dwParam)
+static void CALLBACK SafeUnhookEventFunc(void *param)
{
- UnhookEvent(((SafeUnhookEventParam *)dwParam)->hEvent);
- PostMessage(((SafeUnhookEventParam *)dwParam)->hwndPopup, UM_POPUPUNHOOKCOMPLETE, 0,
- (LPARAM)((SafeUnhookEventParam *)dwParam)->hEvent);
- delete (SafeUnhookEventParam *)dwParam;
+ SafeUnhookEventParam *p = (SafeUnhookEventParam*)param;
+
+ UnhookEvent(p->hEvent);
+ PostMessage(p->hwndPopup, UM_POPUPUNHOOKCOMPLETE, 0, (LPARAM)p->hEvent);
+ delete p;
}
INT_PTR Popup_UnhookEventAsync(WPARAM wParam, LPARAM lParam)
@@ -343,7 +344,7 @@ INT_PTR Popup_UnhookEventAsync(WPARAM wParam, LPARAM lParam)
SafeUnhookEventParam *param = new SafeUnhookEventParam;
param->hwndPopup = (HWND)wParam;
param->hEvent = (HANDLE)lParam;
- QueueUserAPC(SafeUnhookEventFunc, hMainThread, (ULONG_PTR)param);
+ CallFunctionAsync(SafeUnhookEventFunc, param);
return 0;
}