mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Close Settings Window on runner exit (#2695)
This commit is contained in:
committed by
GitHub
parent
d65e2ab2d4
commit
462c17a0c3
@@ -390,3 +390,15 @@ void open_settings_window()
|
||||
std::thread(run_settings_window).detach();
|
||||
}
|
||||
}
|
||||
|
||||
void close_settings_window()
|
||||
{
|
||||
if (g_settings_process_id != 0)
|
||||
{
|
||||
HANDLE proc = OpenProcess(PROCESS_TERMINATE, false, g_settings_process_id);
|
||||
if (proc != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
TerminateProcess(proc, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user