mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Added step to dispose the keyboard hook object (#4449)
This commit is contained in:
@@ -6,7 +6,7 @@ using interop;
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public delegate void KeyEvent(int key);
|
||||
|
||||
|
||||
public delegate bool IsActive();
|
||||
|
||||
public class HotkeySettingsControlHook
|
||||
@@ -49,5 +49,11 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Dispose the KeyboardHook object to terminate the hook threads
|
||||
hook.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user