summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/toast_event_handler.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-16 12:35:57 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-16 12:35:57 +0000
commitd0a1040e019092c29d8d2a2c2a29bc1e7644a5e5 (patch)
tree9297e79ab09653aa870c5ef83c163673fbce8e6c /plugins/Toaster/src/toast_event_handler.cpp
parent87208846a0e7fd82e246dd1e6a9cddfc0ca159e4 (diff)
Toaster: more optimizations
git-svn-id: http://svn.miranda-ng.org/main/trunk@15361 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/toast_event_handler.cpp')
-rw-r--r--plugins/Toaster/src/toast_event_handler.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/Toaster/src/toast_event_handler.cpp b/plugins/Toaster/src/toast_event_handler.cpp
index c6682da954..abb24ece06 100644
--- a/plugins/Toaster/src/toast_event_handler.cpp
+++ b/plugins/Toaster/src/toast_event_handler.cpp
@@ -3,7 +3,7 @@
using namespace ABI::Windows::UI::Notifications;
using namespace Microsoft::WRL;
-ToastEventHandler::ToastEventHandler(_In_ ToastHandlerData *pData) : _ref(1), _thd(pData)
+ToastEventHandler::ToastEventHandler(_In_ ToastHandlerData *pData) : _ref(0), _thd(pData)
{
if (_thd->pPopupProc)
_thd->pPopupProc((HWND)this, UM_INITPOPUP, (WPARAM)this, 0);
@@ -68,7 +68,6 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */,
{
if (_thd->pPopupProc)
_thd->pPopupProc((HWND)this, WM_CONTEXTMENU, 0, 0);
- //delete this;
break;
}
case ToastDismissalReason_UserCanceled:
@@ -76,11 +75,9 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */,
if (_thd->pPopupProc)
_thd->pPopupProc((HWND)this, WM_CONTEXTMENU, 0, 0);
_thd->tstNotification->Hide();
- //delete this;
break;
}
case ToastDismissalReason_TimedOut:
- //delete this; // should be rewritten
break;
}
@@ -95,4 +92,14 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */,
mir_cslock lck(csNotifications);
lstNotifications.remove(_thd->tstNotification);
return S_OK;
+}
+
+void* ToastEventHandler::GetPluginData()
+{
+ return _thd->vPopupData;
+}
+
+MCONTACT ToastEventHandler::GetContact()
+{
+ return _thd->hContact;
} \ No newline at end of file