mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[KBM] Fix for handle leak (#11182)
This commit is contained in:
@@ -9,7 +9,15 @@ class KeyboardManager
|
||||
public:
|
||||
// Constructor
|
||||
KeyboardManager();
|
||||
|
||||
|
||||
~KeyboardManager()
|
||||
{
|
||||
if (editorIsRunningEvent)
|
||||
{
|
||||
CloseHandle(editorIsRunningEvent);
|
||||
}
|
||||
}
|
||||
|
||||
void StartLowlevelKeyboardHook();
|
||||
void StopLowlevelKeyboardHook();
|
||||
|
||||
@@ -38,6 +46,8 @@ private:
|
||||
|
||||
std::atomic_bool loadingSettings = false;
|
||||
|
||||
HANDLE editorIsRunningEvent = nullptr;
|
||||
|
||||
// Hook procedure definition
|
||||
static LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user