mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From c5faeceaf36f4b9fb27e5269990b716a25ecbe43 Mon Sep 17 00:00:00 2001
|
|
From: Jake Barnes <me@jakebarn.es>
|
|
Date: Mon, 3 May 2021 11:58:27 +1000
|
|
Subject: [PATCH] Fix activation not writing to pipe
|
|
|
|
---
|
|
src/toasteventhandler.cpp | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/src/toasteventhandler.cpp b/src/toasteventhandler.cpp
|
|
index d45d92f..e239dde 100644
|
|
--- a/src/toasteventhandler.cpp
|
|
+++ b/src/toasteventhandler.cpp
|
|
@@ -79,6 +79,13 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification * /*sender*/,
|
|
std::wcout << dataMap.at(L"button") << std::endl;
|
|
m_userAction = SnoreToastActions::Actions::ButtonClicked;
|
|
}
|
|
+ if (!m_toast.pipeName().empty()) {
|
|
+ if (m_userAction == SnoreToastActions::Actions::ButtonClicked) {
|
|
+ Utils::writePipe(m_toast.pipeName(), m_toast.formatAction(m_userAction, { { L"button", dataMap.at(L"button") } }));
|
|
+ } else {
|
|
+ Utils::writePipe(m_toast.pipeName(), m_toast.formatAction(m_userAction));
|
|
+ }
|
|
+ }
|
|
}
|
|
SetEvent(m_event);
|
|
return S_OK;
|
|
--
|
|
2.35.1
|
|
|