summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/toast_event_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/toast_event_handler.cpp')
-rw-r--r--plugins/Toaster/src/toast_event_handler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Toaster/src/toast_event_handler.cpp b/plugins/Toaster/src/toast_event_handler.cpp
index 47ceb8d561..51689bab3e 100644
--- a/plugins/Toaster/src/toast_event_handler.cpp
+++ b/plugins/Toaster/src/toast_event_handler.cpp
@@ -52,12 +52,16 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */,
if (_callback != nullptr)
_callback(_arg);
+ callbackArg *cb = (callbackArg*)_arg;
+ mir_cslock lck(csNotifications);
+ lstNotifications.remove(cb->notification);
return S_OK;
}
IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, _In_ IToastDismissedEventArgs* /* e */)
{
callbackArg *cb = (callbackArg*)_arg;
+ mir_cslock lck(csNotifications);
lstNotifications.remove(cb->notification);
return S_OK;
}
@@ -65,6 +69,7 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */,
IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, _In_ IToastFailedEventArgs* /* e */)
{
callbackArg *cb = (callbackArg*)_arg;
+ mir_cslock lck(csNotifications);
lstNotifications.remove(cb->notification);
return S_OK;
} \ No newline at end of file