From 7a3c326442da065b4fcf8a1c9b1fdd86121c875e Mon Sep 17 00:00:00 2001 From: Alekhya Reddy Date: Wed, 18 Mar 2020 16:13:36 -0700 Subject: [PATCH] Code to terminate wox when we exit PowerToys --- src/modules/launcher/Wox.Launcher/dllmain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/launcher/Wox.Launcher/dllmain.cpp b/src/modules/launcher/Wox.Launcher/dllmain.cpp index d3ee29e670..773c726525 100644 --- a/src/modules/launcher/Wox.Launcher/dllmain.cpp +++ b/src/modules/launcher/Wox.Launcher/dllmain.cpp @@ -50,6 +50,14 @@ public: init_settings(); }; + ~Wox_Launcher() { + if (m_enabled) + { + TerminateProcess(m_hProcess, 1); + } + m_enabled = false; + } + // Destroy the powertoy and free memory virtual void destroy() override { delete this;