From e07beb22613a7d7c1d4cf7670d52d99546137e89 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 9 Apr 2025 12:33:22 +0800 Subject: [PATCH] Add dispose --- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index b149884d7..0d395c053 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -13,7 +13,7 @@ using Keys = System.Windows.Forms.Keys; namespace Flow.Launcher.Plugin.Shell { - public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu + public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu, IDisposable { private static readonly string ClassName = nameof(Main); @@ -442,5 +442,10 @@ namespace Flow.Launcher.Plugin.Shell return results; } + + public void Dispose() + { + Context.API.RemoveGlobalKeyboardCallback(API_GlobalKeyboardEvent); + } } }