Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a1008fa9ec CmdPal: Remove appLicensing capability to fix windows.firewall installation failure
Agent-Logs-Url: https://github.com/microsoft/PowerToys/sessions/24ad55ef-4c4b-4d09-b6cf-6855618d5783

Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com>
2026-04-29 09:18:06 +00:00
copilot-swe-agent[bot]
4ff034d679 Initial plan 2026-04-29 08:50:17 +00:00
2 changed files with 1 additions and 10 deletions

View File

@@ -655,15 +655,7 @@ public sealed partial class MainWindow : WindowEx,
// Once we're done, uncloak to avoid all animations
Uncloak();
// Use StealForeground to reliably bring the window to the foreground.
// A plain SetForegroundWindow call can fail when the process does not
// hold the foreground lock (e.g. when summoned via Quick Access or a
// named-event trigger while another app is in the foreground).
// StealForeground uses AttachThreadInput to temporarily borrow the
// foreground thread's input context, which gives us permission to call
// SetForegroundWindow regardless of which process currently owns the
// foreground.
StealForeground();
PInvoke.SetForegroundWindow(hwnd);
PInvoke.SetActiveWindow(hwnd);
// Push our window to the top of the Z-order and make it the topmost, so that it appears above all other windows.

View File

@@ -86,6 +86,5 @@
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources" />
<rescap:Capability Name="appLicensing" />
</Capabilities>
</Package>