mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PTRun] Fix always show after executing context menu result (#21291)
* fix always show * add tests * remove workaround
This commit is contained in:
committed by
GitHub
parent
a3042b8435
commit
460f242967
@@ -42,9 +42,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
return false;
|
||||
}
|
||||
|
||||
// As a workaround to close PT Run after executing the context menu command, we switch to the window before closing it (Issue #16601).
|
||||
// We use the setting OpenAfterKillAndClose to detect if we have to switch.
|
||||
windowData.CloseThisWindow(!WindowWalkerSettings.Instance.OpenAfterKillAndClose);
|
||||
windowData.CloseThisWindow();
|
||||
|
||||
return !WindowWalkerSettings.Instance.OpenAfterKillAndClose;
|
||||
},
|
||||
@@ -102,12 +100,6 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
}
|
||||
}
|
||||
|
||||
// As a workaround to close PT Run before executing the command, we switch to the window before killing it's process
|
||||
if (!WindowWalkerSettings.Instance.OpenAfterKillAndClose)
|
||||
{
|
||||
window.SwitchToWindow();
|
||||
}
|
||||
|
||||
// Kill process
|
||||
window.Process.KillThisProcess(WindowWalkerSettings.Instance.KillProcessTree);
|
||||
return !WindowWalkerSettings.Instance.OpenAfterKillAndClose;
|
||||
|
||||
Reference in New Issue
Block a user