mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-10 12:33:27 +02:00
5958c1628545fcbf0db10546ea5bdcce6600a22d
4399 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5958c16285 |
fix: prevent memory leak in CmdPal extension activation via global hotkey
Fixes a race condition where _initializeItemsTask subscribes to COM events on IListItem/IPage objects after SafeCleanup has already run, leaving those subscriptions permanently alive (held by the cross-process COM event registration in the extension process). Changes: - ExtensionObjectViewModel: add IsCleanedUp volatile property, set before UnsafeCleanup() so background threads see it immediately - CommandItemViewModel.InitializeProperties: guard against IsCleanedUp at entry and after subscribing (double-check to close the race window) - PageViewModel.InitializeProperties: same guard pattern for page PropChanged - ListViewModel.UnsafeCleanup: unsubscribe _lastSelectedItem.PropertyChanged to sever the delegate chain that keeps ListViewModel alive - ShellViewModel.LoadPageViewModelAsync: call SafeCleanup() (not just Dispose) when navigation is cancelled; use CancellationToken.None for the UI-thread task so the cleanup lambda always runs even if the token is already cancelled Agent-Logs-Url: https://github.com/microsoft/PowerToys/sessions/0bf9ec35-b19d-4ea4-971d-803a1d4f305e Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com> |
||
|
|
e6d346a59b |
[PowerDisplay] Default-off and confirm dialog for InputSource/ColorTemp/PowerState (#47303)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Three per-monitor PowerDisplay features have failure modes recoverable only via physical buttons: Input Source — switching to an input with no signal goes black; PowerToys can no longer drive a panel that isn't displaying its own signal Color Temperature — some monitors apply changes that cannot be reset via DDC/CI; OSD reset required Power State — VCP 0xD6 standby may not respond to subsequent DDC/CI wake commands This PR: Defaults all three features off for newly-discovered monitors. Supports* derivation from VCP capabilities is unchanged — unsupported checkboxes are still greyed out. Pops a confirmation dialog when a user toggles any of them on in Settings, mirroring the existing Color Temperature warning. Cancel reverts the checkbox; Enable keeps it. Refactors the existing Color Temperature click handler into a shared HandleDangerousFeatureClickAsync(sender, resourceKeyPrefix, setter) helper. All three feature handlers now reuse it. Renames PowerDisplay_ColorTemperature_EnableButton → PowerDisplay_Dialog_Enable so the three dialogs share one button-text resource (paralleling the existing shared PowerDisplay_Dialog_Cancel) <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
2aece74831 |
[PowerDisplay] Use localized "Built-in Display" name for internal display (#47321)
Set all WMI monitor's name to "Built-in Display" to avoid confusing. related discussion: #47255 <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: # <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Niels Laute <niels.laute@live.nl> |
||
|
|
7861bc408c |
Replay both key down and up for Win in GrabAndMove (#47326)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request The code for keyup on the `Win` key would replay the previously absorbed keydown event and just leave this keyup to propagate normally, thus leading to a race condition between `CallNextHookEx` and `SendInput`. This resulted in almost guaranteed out-of-order event (`Win` up, followed by `Win` down) in the case of `Win+G` (the Xbox Game bar shortcut). Fixed by also absorbing the keyup for `Win`, but calling `SendInput` for both keydown and keyup. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47293 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
b835cde4d2 |
CmdPal: Fix a bug where dock label settings wouldn't save (#47317)
This setting is totally vestigial, from the 0.9 dev cycle. Unfortunately, the JSON parser would see that it wasn't in the settings.json, then it would write `null` to it. But `ShowLabels` was just a thin alias for `ShowTitles`, so we'd end up parsing totally sane JSON settings into having `null` for `ShowTitle`. This fixes that. You can hide your titles again folks. |
||
|
|
f79df0663c |
Skip desktop / explorer targets in GrabAndMove (#47302)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Added a few known Windows processes and window classes from desktop elements to the implicit exclusion list, to avoid funny repositioning of otherwise immovable content: - The Windows Start menu. - Tooltips from around the Notification Area (System Tray). - The Alt-Tab and Win-Tab windows. - Tooltips. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Copilot <copilot@github.com> |
||
|
|
7211f7ed67 |
cmdpal: fix our settings load crash (#47296)
Fixes a category of crashes in CmdPal, related to our settings parsing.
It would seem that I don't understand JSON parsing all that well in C#.
Basically, we've got a bunch of places where we have
```c#
class Foo
{
public Bar MySetting {get;init;} = new()
}
```
but when we JSON deserialize the settings, if there wasn't a
`"MySetting"` key, then the deserializer deserializes to `null`, not
`new()`. but since `Foo.MySetting` isn't a `Bar?`, then the compiler
can't check the fact that json _gets special rules to write a null to
it????_
Closes #47249
tested with the settings.json from that thread.
|
||
|
|
215dfaf236 |
GrabAndMove release Alt key on other keypresses (#47261)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request When the Alt modifier is already pressed, "release" it on any other interaction but the allowed mouse interactions. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47257 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed I ensured that pressing something like Shift, Ctrl, or even a character key - besides Tab, of course, properly resets the internal state of Alt. The win key was never affected by this behavior. Co-authored-by: Copilot <copilot@github.com> |
||
|
|
f5a294bb66 |
[PowerDisplay] Add more log for PowerDisplay (#47270)
Users have reported missing monitors but the existing logs lack the information needed to diagnose. Add discovery-phase logs that record the raw MCCS capabilities string from the monitor, the parsed feature support flags (brightness/contrast/color temperature/volume), the specific reason a monitor is ignored, and DDC/CI API failures. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
fecd2e72a7 |
Handle DockSize enum changes (#47212)
### ⚠️ REVIEWERS TO DECIDE. MERGE THIS PR OR GO FOR: #47214⚠️ ### Root cause PR #46699 (compact mode) replaced the original `DockSize` enum (`Small`/`Medium`/`Large`) with a new one (Default/Compact). Existing users have `DockSize`: `Small` (or `Medium`/`Large`) in their `settings.json`, which the source-generated EnumConverter can't parse → the entire settings file fails to load. ### Fix Added a custom `JsonConverter<DockSize>` in _src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Settings/DockSettings.cs_ and applied it via `[JsonConverter]` on the enum. The converter: - Accepts current values (`Default`, `Compact`) — case-insensitive. - Maps any unknown legacy string (e.g. `Small`/`Medium`/`Large`) to `DockSize.Default`, preserving the user's existing visual experience. - Tolerates numeric values too, falling back to `Default` if out of range. - Writes as a string so output stays consistent with the source-gen `UseStringEnumConverter` setting. |
||
|
|
c68003c678 |
Avoid MessageBox in ZoomIt in PowerToys (#47215)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This stops the ZoomIt message boxes complaining about keyboard shortcut conflicts - such conflicts are handled by the PowerToys settings window. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47154 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Setting any ZoomIt shortcut to the same sequence as other shortcuts won't produce the MessageBox anymore. The easiest is to use the default shortcuts and to bind the last one, **Panorama activation** to `Ctrl+7` (instead of the default `Ctrl+8`). `Ctrl+7` clashes with the ZoomIt **DemoType activation** shortcut. To make the MessageBox pop-out before the fix, takes pressing a few `Ctrl+1`s (the default **Zoom activation**). --------- Co-authored-by: Copilot <copilot@github.com> |
||
|
|
8536d7b1cd |
Fix MSIX sparse package DACL contamination breaking File Explorer preview handlers (#47177)
## Summary Moves the MSIX sparse package's `ExternalLocation` from the PowerToys root install folder to the `WinUI3Apps\` subfolder, isolating DACL contamination from preview handler DLLs. ## Problem On Windows 23H2/24H2/25H2, MSIX sparse package registration adds AppContainer SIDs (`S-1-15-2-*` / `S-1-15-3-*`) to the DACL of the `ExternalLocation` folder. Since `ExternalLocation` pointed to the PowerToys root install folder, this broke File Explorer preview handlers — `prevhost.exe` (running at LOW integrity) could no longer load preview handler DLLs (`.txt`, `.md`, `.pdf`, `.svg`, etc.). ## Fix - **`CustomAction.cpp`**: Changed `ExternalLocation` from `installFolderPath` → `installFolderPath + L"WinUI3Apps\\"` - **`AppxManifest.xml`**: Removed unused PowerOCR `<Application>` entry; stripped `WinUI3Apps\` prefix from `Executable` paths (now relative to new ExternalLocation) - **`CmdPal.Ext.PowerToys.csproj`**: Moved `OutputPath` to `WinUI3Apps\` so the AOT-compiled extension EXE resolves correctly under the new ExternalLocation - **WiX installer files**: Updated source/install paths for KBM assets, CmdPal satellite assemblies, and `CommandPalette.Extensions.winmd` that moved with the CmdPal output - **ESRP signing**: Updated CmdPal dll/exe paths to include `WinUI3Apps\` prefix ## Validation | Test | 25H2 | 23H2 | |------|------|------| | DACL isolation (no S-1-15-* on root) | ✅ | ✅ | | Preview handlers (.txt, .md, .pdf, .svg) | ✅ | ✅ | | Peek | ✅ | ✅ | | Context menus (PowerRename, FileLocksmith, ImageResizer, New+) | ✅ | ✅ | | Upgrade path (old → new) | ✅ | ✅ | ## Files changed (12) - `installer/PowerToysSetupCustomActionsVNext/CustomAction.cpp` — core fix - `src/PackageIdentity/AppxManifest.xml` — manifest cleanup - `src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csproj` — output path - `src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Helpers/PowerToysResourcesHelper.cs` — icon path - `installer/PowerToysSetupVNext/BaseApplications.wxs` — winmd source path - `installer/PowerToysSetupVNext/KeyboardManager.wxs` — KBM assets path - `installer/PowerToysSetupVNext/Resources.wxs` — CmdPal satellite paths - `installer/PowerToysSetupVNext/generateAllFileComponents.ps1` — scan path - `.pipelines/ESRPSigning_core.json` — signing paths - `src/PackageIdentity/BuildSparsePackage.ps1` — dev script hint - `src/PackageIdentity/readme.md` — docs - `doc/devdocs/modules/cmdpal/powertoys-extension-local-development.md` — docs --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
ca1ffebc26 |
[Light Switch] Fix PowerDisplay profile integration (#47190)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Fixes two bugs in the Light Switch ↔ PowerDisplay integration: 1. **Settings UI was hidden.** The "Apply monitor settings" expander (dark/light profile pickers) and the "PowerDisplay disabled" warning InfoBar were temporarily commented out in PR #46160. Users had no way to configure which profile to bind to each theme. 2. **Hotkey only applied one profile.** On every hotkey press ModuleInterface flips the Windows theme, but the service only notified PowerDisplay when `isManualOverride` toggled from `false` to `true`. Every even-numbered press was silently dropped, so the monitor profile stayed stuck on whichever direction the user pressed first. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
2e5c7d2ee6 |
Refresh check-spelling 0.0.26 (#47119)
This is a refresh based on
|
||
|
|
949e42c5c7 |
CmdPal: Fix crash when typing w/ indexer fallback on (#47186)
This isn't the same crash as #47148. It's another one. Undoubtably regressed in #46907 The function signature was all wrong. Hence the `System.ExecutionEngineException` Tested manually. |
||
|
|
a65266fcad |
cmdpal: fix the dock window border being visible on startup (#47187)
This is worse after the compact mode change fixed our frame margins. We hide our window frame with DWM. However, we only did that when we we `Activated`. Turns out, when the window is first created? we're not `Activated`. So until you focus another window, we'd look... objectively bad. |
||
|
|
656ea91580 |
CmdPal: Enable dock pinning and per-profile icons for Windows Terminal (#46372)
## Summary of the Pull Request
Enables Windows Terminal profiles to be **pinned to the Command Palette
dock** and shows **per-profile icons** instead of the generic Terminal
app logo.
### Dock Pinning
**Root cause:** `LaunchProfileCommand.Id` was never set (defaulted to
`string.Empty`). The context menu factory checks
`!string.IsNullOrEmpty(itemId)` before showing "Pin to Dock", so the
option was silently hidden. Additionally, `GetCommandItem()` was not
overridden, so pinned commands could not be resolved on load.
**Fix:**
- Set stable `Id` on `LaunchProfileCommand` (format:
`terminal/{appUserModelId}/{profileName}`)
- Rename constructor parameter `id` → `appUserModelId` to avoid
ambiguity with the generated command `Id`
- Override `GetCommandItem(string id)` in
`WindowsTerminalCommandsProvider` to look up profile items by ID
<img
src="https://github.com/user-attachments/assets/81c7acfc-09b5-40ab-be1d-8f268b24219b">
### Per-Profile Icons
**Root cause:** All profiles showed the same Terminal application logo.
The per-profile `icon` field from Terminal settings.json was parsed into
`TerminalProfile.Icon` but never used.
**Fix:**
- Add `InstallPath` to `TerminalPackage` (from `Package.InstalledPath`)
- Add `ResolveProfileIcon()` helper to `TerminalHelper` that resolves
`ms-appx:///` URIs to the Terminal package install directory (with scale
variant probing), passes through file paths and glyphs, and falls back
to the Terminal logo
- Cache the resolved icon in a local variable to avoid duplicate
filesystem IO per profile
- Set resolved per-profile icon on both `ListItem.Icon` and
`LaunchProfileCommand`
<img
src="https://github.com/user-attachments/assets/a9a476e2-7932-4457-bf04-bc346f2ad971">
### Robustness
- Use `Guid.TryParse` instead of `Guid.Parse` when reading profile GUIDs
from settings.json, so a malformed or empty GUID value does not throw
and take down the entire profile list
## PR Checklist
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
## Detailed Description of the Pull Request / Additional comments
**Files changed:**
- `Commands/LaunchProfileCommand.cs` — Assigns stable `Id`, renames `id`
→ `appUserModelId` throughout, adds `static MakeId()` helper
- `Helpers/TerminalHelper.cs` — Adds `ResolveProfileIcon()`,
`TryResolveGuidIcon()`, and `ResolveAppxPath()` helpers; hardens GUID
parsing with `Guid.TryParse`
- `Helpers/TerminalQuery.cs` — Passes `p.InstalledPath` to the
`TerminalPackage` constructor
- `Pages/ProfilesListPage.cs` — Resolves and caches icon path per
profile; sets `ListItem.Icon`
- `TerminalPackage.cs` — Adds `InstallPath` property
- `WindowsTerminalCommandsProvider.cs` — Overrides
`GetCommandItem(string id)` for dock-pinned command rehydration; removes
unused `using` directive
## Validation Steps Performed
- [x] Build clean with exit code 0
- [x] Dock pinning tested and working — "Pin to Dock" option appears and
survives restart
- [x] Per-profile icons verified — each profile displays its own icon in
both the list and the dock
---------
Co-authored-by: Michael Jolley <mike@baldbeardedbuilder.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
|
||
|
|
d9bfc42229 |
CmdPal: Fix fallback command disable toggle using interface type check (#47127)
## Summary One-line fix for [#46928](https://github.com/microsoft/PowerToys/issues/46928) — unable to disable built-in and third-party extension fallback commands in Command Palette. ## Problem In `TopLevelViewModel.cs`, the constructor checked: ```csharp if (IsFallback && commandItem is FallbackCommandItem fallback) ``` This uses the **concrete toolkit class** `FallbackCommandItem`. However, extensions loaded out-of-process via WinRT/COM only expose **interface proxies** — they never match the concrete class. As a result, `_fallbackId` was never set, and the settings toggle to disable a fallback command had no effect. ## Fix Changed the type check to use the `IFallbackCommandItem2` WinRT interface (which defines the `Id` property): ```csharp if (IsFallback && commandItem is IFallbackCommandItem2 fallback) ``` The `IFallbackCommandItem2` interface is already defined in the Extensions IDL and implemented by `FallbackCommandItem` in the toolkit. This correctly matches both in-process and out-of-process extension objects. ## Validation - [x] Build clean (`Microsoft.CmdPal.UI.ViewModels` — exit code 0) - [x] No ABI or schema changes - [x] Single file changed, single line modified Fixes #46928 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
11bfb40ec6 |
bump cmdpal to 0.10 (#47181)
title |
||
|
|
bfc5fea11e |
Fix CmdPal crash when typing in search box (#47148)
Add reentrancy guard for FilteredItems ObservableCollection mutations. WinUI3's native XAML renderer can pump the message loop while processing a CollectionChanged notification from InPlaceUpdateList. This allows a second DoOnUiThread task to begin mutating FilteredItems while the first is still mid-update, causing heap corruption and an access violation (0xc0000005) in ntdll.dll. The fix introduces RunFilteredItemsUpdate() which uses a boolean flag to detect same-thread reentrancy (C# lock is reentrant so _listLock cannot prevent this). When reentrancy is detected, only the latest pending update is stored and executed after the in-flight mutation completes, ensuring the UI converges to the newest state without overlapping mutations. Fixes: 100% reproducible crash in CmdPal when typing any character in the search box (build ID 145015494). <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47145 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
5c15a63846 |
Power Display tweaks (#47163)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Consistent naming: `Power Display` - Making the flyout a bit smaller - Removing dead code (titlebar button colors) <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47153 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
2c95a61bb3 |
fix(cmdpal): refresh dock settings on pin/unpin (#47155) (#47169)
## Summary of the Pull Request Fixes the CmdPal Dock not refreshing when a command is pinned or unpinned. The dock now immediately reflects pin/unpin changes without requiring a CmdPal restart. **Root cause:** `DockViewModel._settings` was cached at construction and only refreshed via the `SettingsChanged` event. However, pin/unpin operations in `CommandProviderWrapper.PinDockBand()` / `UnpinDockBand()` intentionally save with `hotReload: false` (to avoid double-updates), so `SettingsChanged` never fires. When `DockBands_CollectionChanged` called `SetupBands()`, it iterated over the stale `_settings` which didn't include the newly pinned band. **Fix:** Re-read `DockSettings` from the settings service at the top of `DockBands_CollectionChanged`, ensuring `SetupBands()` always sees the latest persisted state. ## PR Checklist - [x] Closes: #47155 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized — N/A (no UI string changes) - [ ] **Dev docs:** Added/updated — N/A (no public API or behavior doc changes) ## Detailed Description of the Pull Request / Additional comments Single-line change in `src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Dock/DockViewModel.cs`: ```csharp _settings = _settingsService.Settings.DockSettings; ``` Added before the existing `SetupBands()` call inside `DockBands_CollectionChanged`. The edit-mode guard (`_isEditing`) is already checked earlier in the method, so drag/drop operations are unaffected. This fix covers both pin and unpin flows since both use the same `hotReload: false` → `CommandsChanged` → `DockBands_CollectionChanged` code path. ## Validation Steps Performed - Built `Microsoft.CmdPal.UI.ViewModels.csproj` — exit code 0, no warnings related to change - Verified unpin flow uses the same code path and benefits from the fix - Manual verification: pin a command via CmdPal → dock updates immediately without restart Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
dbc390ab0d |
fix: default 8 modules to disabled to match EnabledModules.cs (#47144)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Fixes a mismatch where 8 modules inherited the default
`is_enabled_by_default() = true` from `PowertoyModuleIface` while
`EnabledModules.cs` declared them `false`. On a clean install the Runner
would enable these modules on first launch, then Settings UI would flip
them back off once it persisted `settings.json` — a one-time visible
flicker and a DSC compliance gap.
Adds an explicit `is_enabled_by_default() const override { return false;
}` in the following module interfaces so both sides of the default
agree:
- `src/modules/launcher/Microsoft.Launcher/dllmain.cpp` (PowerToys Run)
- `src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp`
- `src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp`
- `src/modules/Hosts/HostsModuleInterface/dllmain.cpp`
- `src/modules/registrypreview/RegistryPreviewExt/dllmain.cpp`
-
`src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/dllmain.cpp`
- `src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp`
- `src/modules/powerdisplay/PowerDisplayModuleInterface/dllmain.cpp`
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
c6a79360f3 |
Unstick GrabAndMove keys, add Win modifier and improve coords (#47052)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This brings some quality of life fixes: - Alt won't stick when pressing Ctrl+Alt+Del or Alt+Tab into an admin process. - Add Win as an option for the move/resize modifier. - The box window geometry box is opaque now. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Tested that Ctrl+Alt+Del doesn't stick the Alt key. - Tested that the Win key works as expected as a modifier. - Compared the last commit for performance with the previous one (the opaque geometry info box is drawn with an increased number of calls). |
||
|
|
c8ffcb73c3 |
[ImageResizer] Fix JPEG quality setting ignored after WinUI3 migration (#47134)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Restores honoring of the user-configured JPEG quality — via the Settings UI slider, the CLI `--quality` flag, or the persisted `imageresizer_jpegQualityLevel` — when resizing JPEG files. Since the WinUI3 migration (#45288) any Q value from 1 to 100 produced byte-identical output at WIC's internal default (~Q90) because the transcode encoder silently ignored the setting. Only `src/modules/imageresizer/ui/Models/ResizeOperation.cs` is changed. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47135 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Built `ImageResizerCLI.csproj` in `Release|x64` with `/p:RuntimeIdentifier=win-x64`; no new warnings. Ran the resulting `x64\Release\WinUI3Apps\PowerToys.ImageResizerCLI.exe` against a synthetic test JPEG (`a.jpg` 2373×905, ~240 KB) and both in-tree EXIF assets: - `src/modules/imageresizer/tests/TestMetadataIssue1928.jpg` (42 EXIF properties) - `src/modules/imageresizer/tests/TestMetadataIssue2447.jpg` (44 EXIF properties) Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
de6ba922fd |
Fixing OOBE and assets for Power Display and Grab And Move (#47033)
## Summary Adds the out-of-box experience (OOBE) for the new **Grab And Move** module and refreshes related assets across the repo. ## Changes ### Grab And Move OOBE - New `OobeGrabAndMove.xaml` / `.xaml.cs` page following the standard PowerToys OOBE pattern (hero image, How to use, Tips & tricks, Settings button, Learn more link) - Wired into `OobeWindow.xaml(.cs)` as a new `NavigationViewItem` so it appears in the OOBE wizard - Added localized resource strings (Title, Description, How to use, Tips and tricks) in `Resources.resw` - New OOBE animation: `Assets/Settings/Modules/OOBE/GrabAndMove.gif` ### Settings UI polish - Moved the Grab And Move nav item under *Windowing & Layouts* into its proper alphabetical position (after FancyZones, before Workspaces) - Added a "NEW" `InfoBadge` to both the Grab And Move item and its parent *Windowing & Layouts* group so users can discover the new utility ### Asset refresh - High-res `GrabAndMove.ico` (replaces the placeholder) - Updated Settings module icons (`Assets/Settings/Icons/GrabAndMove.png`, `Assets/Settings/Modules/GrabAndMove.png`) - New overview/marketing PNGs under `doc/images/overview/` (large, small, and original) ### README - Added **Grab And Move** and **PowerDisplay** to the utilities table in `README.md`, reflowed alphabetically into a clean 10x3 grid - New `doc/images/icons/GrabAndMove.png` and `doc/images/icons/PowerDisplay.png` for the table ## Validation - Settings UI builds cleanly - Grab And Move appears in the OOBE wizard navigation and renders correctly - "NEW" badges visible on first launch - README table renders with all 30 utilities, no empty trailing cells <img width="1307" height="807" alt="image" src="https://github.com/user-attachments/assets/f8d2ef96-a9f3-4307-9714-c308e216c044" /> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
71cb9bc54e |
[Quick Accent] Fix issue where default "All available" setting is not parsed correctly (#47117)
## Summary of the Pull Request
When first enabled in the Settings application, Quick Accent defaults to
**All available** character sets, but the persisted "ALL" option in the
settings.json file is not understood by the application itself. This
leads to the fallback SPECIAL character set being selected - unbeknownst
to the user - which only contains a small subset of the available
mappings.
This PR also adds two new characters to the Hungarian language, as
requested under #47085.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] Closes: #47113
- [x] Closes: #47085
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
The cause of the issue is:
1. The default `SelectedLang` value for a new Quick Accent settings file
is "ALL", set in `PowerAccentProperties.cs`:
|
||
|
|
bf00c1b94f |
[Common][PowerDisplay][QuickAccess] Shared flyout positioning helper (#47097)
## Summary Introduces a shared FlyoutWindowHelper in Common.UI.Controls and migrates both **PowerDisplay** and **QuickAccess** to it, eliminating two pre-existing flyout positioning bugs and removing duplicated math. ## Bugs fixed ### 1. PowerDisplay flyout overlapped the taskbar at 100% scaling The previous PowerDisplay-only positioning math anchored to the screen bounds rather than `DisplayArea.WorkArea` on certain monitor configurations, so the bottom edge of the flyout could land on top of the taskbar. ### 2. QuickAccess flyout rendered too large / partially off-screen after switching DPI between 150% and 100% The previous code passed `WindowEx.Width`/`Height` into `MoveAndResize` on every summon. Those properties are **not** the XAML literals — they are computed live as `AppWindow.Size / GetDpiForWindow() * 96`. After a system-scaling switch, the runtime size has drifted, that wrong "DIP" value got fed into `MoveAndResize`, and the destination DPI multiplier scaled it again → wrong size, and the wrong size shifted the bottom-right anchor off-screen. QuickAccess now caches the XAML design size once at construction (when the values are still trustworthy) and uses the cache as the source of truth. ## How the helper works - Uses **absolute screen coordinates** against `DisplayArea.WorkArea`, so it handles non-primary and negatively-positioned monitors correctly. - Performs a **1×1 `MoveAndResize` "teleport"** onto the target display before the final visible-size call. The 1×1 jump may cross a DPI boundary, but it's invisible; the second call sets the real size while the window is already on the destination monitor, so no DPI boundary is crossed for the rendered size and `WM_DPICHANGED` never fires on a visible window. - Exposes overloads for bottom-right anchoring (both flyouts) and centered placement (PowerDisplay's `IdentifyWindow`). This teleport-then-size approach matches the technique the original Settings.UI flyout used for years before it was removed. ## Cleanup - Deletes the PowerDisplay-only `DpiSuppressor` — its WM_DPICHANGED-suppression code path is now dead because the helper sidesteps the message entirely. - The `DpiSuppressor` class also doubled as a generic WndProc subclass to route `WM_HOTKEY` into `HotkeyService`. That piece is preserved as `WindowMessageHook` in `Common.UI.Controls/Window/` since PowerDisplay still needs in-process hotkey handling. ## Validation - `Common.UI.Controls`, `PowerDisplay`, and `QuickAccess` build clean (x64/Debug). - Manual repro: - PowerDisplay flyout no longer overlaps taskbar at 100% scaling, on multiple invocations. - QuickAccess renders at the correct size and position when switching system scaling between 150% and 100%. - PowerDisplay hotkey toggle still works after the `DpiSuppressor` → `WindowMessageHook` rename. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
7a89220a91 |
[QuickAccent] Add en-dash to VK_MINUS for SPECIAL language (#47106)
## Summary of the Pull Request Add en-dash to the existing dash characters available under the minus key for the Special Characters set. This PR re-creates #45965 by @daverayment because that PR's pipeline appears to have been corrupted. All credit for the change belongs to @daverayment — the commit on this branch preserves their original authorship. ## PR Checklist - [x] Closes: #44030 - [x] Closes: #36805 ## Detailed Description of the Pull Request / Additional comments This PR adds the en-dash '–' character to the VK_MINUS key under the Special Characters character set, positioned before the em-dash character. Although the character is available under VK_COMMA, it should be present under VK_MINUS, along with the other dash characters. Previously, en-dash was available for VK_MINUS under the Hebrew language, so users who selected **All available** character sets (or who specifically selected Hebrew as a workaround) had access to en-dash via the minus key. However, this was seen as a duplication of the VK_COMMA functionality and the character was removed for the Hebrew character set in #43504. Although this is technically correct, this has understandably caused confusion for users who relied on the prior behaviour. The comment on the VK_COMMA for the Special Characters declaration previously read: `csharp // – is in VK_MINUS for other languages, but not VK_COMMA, so we add it here. ` That ""for other languages"" is telling. The Hebrew en-dash entry was removed, and the en-dash mapping for the minus key is not present for any other language, orphaning the functionality. ## Validation Steps Performed Original author @daverayment built and ran the updated Quick Accent code and confirmed that the character was available when only the Special character set was selected, and that it was absent when that set was deselected. Confirmed that the character was available under both comma and minus keys. Co-authored-by: Dave Rayment <dave.rayment@gmail.com> |
||
|
|
3a541bb3eb |
CmdPal: Adding prop to cmdpal.ui.csproj to enable telem in AOT builds (#47121)
This pull request makes a configuration change to the `Microsoft.CmdPal.UI.csproj` project file to improve telemetry support for AOT (Ahead-Of-Time) builds. Project configuration: * Added the `EventSourceSupport` property and set it to `true` to ensure telemetry events are triggered correctly when building with AOT. |
||
|
|
f4d23c85a6 |
[CmdPal Dock] Compact mode (#46699)
## Summary of the Pull Request This PR introduces the following changes: - Shaving off a few pixels of the default height in `Top` or `Bottom` mode. - A new `Compact` mode that automatically hides the `Subtitle` and is 28px in height. - Compact mode is only available for Top/Bottom dock positions. Left/Right always use the Default size. - The Dock Size settings card is hidden in the settings UI when Left or Right is selected. - At runtime, Left/Right positions force `DockSize.Default` regardless of the persisted setting, ensuring default item styles and appbar sizing are always used. The user's Compact preference is preserved so switching back to Top/Bottom restores it. Stable vs. Compact mode: <img width="392" height="131" alt="image" src="https://github.com/user-attachments/assets/f0ac3126-a773-46c6-87da-001fd66c5899" /> <img width="929" height="272" alt="image" src="https://github.com/user-attachments/assets/684c2ea7-449d-4ed2-989d-5066c7f28200" /> ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ### Compact mode restricted to Top/Bottom Compact mode is only supported when the dock is positioned at the Top or Bottom of the screen. When Left or Right is selected: - The **Dock Size** settings card is hidden in the dock settings UI. - The runtime forces \\DockSize.Default\\ so the default band template, default item styles, and default appbar dimensions are always used. - The persisted \\DockSize\\ value is **not** cleared — switching back to Top/Bottom restores the user's previous Compact choice. ### Files changed - \\DockSettingsPage.xaml\\ / \\.xaml.cs\\ — Conditional visibility for the Dock Size settings card - \\DockControl.xaml.cs\\ — Effective size override in \\UpdateSettings()\\ - \\DockWindow.xaml.cs\\ — \\EffectiveDockSize()\\ helper used for appbar sizing and change detection ## Validation Steps Performed --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> |
||
|
|
5e302bed79 |
CmdPal: Improve indexer plain query search (#46907)
## Summary of the Pull Request This PR improves File Search: - Improves simple free-text Windows Search queries with implicit filename broadening while preserving structured AQS input. - Adds resilient fallback behavior for noisy or punctuation-heavy searches by retrying with literal filename matching (fixes failed searches with `&` or other symbols). - Surfaces Windows Search availability and indexing-status notices in the indexer page and fallback item -- if the Windows Search service is down or unreachable, we show this to the user. - Extends production time logging. - Adds documentation of query transformation for maintainers. - Adds some unit tests to pretend that we care. ## Pictures? Pictures! Error notices: <img width="890" height="148" alt="image" src="https://github.com/user-attachments/assets/2370af01-04de-48a5-aa8e-06b95b54571e" /> <img width="880" height="369" alt="image" src="https://github.com/user-attachments/assets/b2afa52b-02f8-4031-a61a-fa1031f86542" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46574 - [X] Closes: #44689 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
520037e128 |
CmdPal: Add persistent calculator history (#45307)
## Summary of the Pull Request This PR adds a persistent memory to Calculator extension and updates result commands. <img width="815" height="515" alt="image" src="https://github.com/user-attachments/assets/e3b84ec4-a399-4c63-a773-76bcdf05f94a" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
d80d216bef |
CmdPal: Fix first-open top-level context menus for slow providers (#46626)
## Summary of the Pull Request This PR fixes opening of the list item context menu through right-click, which affected mainly 3rd party out-of-process extensions. - Keeps the first context-menu request alive when a top-level item is selected but its out-of-proc MoreCommands are still hydrating. - Short-circuits CanOpenContextMenu when a valid synthetic primary command is already available, so items with a usable primary action can open immediately without waiting for late menu hydration. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46625 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
b310c55835 |
fix(cmdpal): handle unavailable extension packages during loading (#47032)
## Summary of the Pull Request Fixes a Watson crash where \AppExtension.Package\ throws a COM/HRESULT exception when the underlying package is in a bad state (being updated, partially installed, recently uninstalled, or corrupted). Previously, one bad extension killed the entire extension-loading loop, preventing **all** extensions from loading. This adds try-catch guards in \ExtensionService\ at two levels so a single failing extension is logged and skipped rather than aborting the enumeration. ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** This is a defensive resilience fix with no behavior change for the happy path; existing tests still pass - [ ] **Localization:** N/A — no end-user-facing strings changed (log messages are developer-facing) - [ ] **Dev docs:** N/A — no new APIs or features - [ ] **New binaries:** N/A — no new binaries ## Detailed Description of the Pull Request / Additional comments **File changed:** \src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionService.cs\ Two try-catch blocks added: 1. **\GetInstalledExtensionsAsync\** — wraps the per-extension loop body (lines 200–211) so that if \CreateWrappersForExtension\ or any property access on \AppExtension\ throws, the loop continues to the next extension. 2. **\CreateWrappersForExtension\** — wraps the per-classId wrapper creation (lines 252–264) so that if the \ExtensionWrapper\ constructor throws (e.g. \ppExtension.Package\ is unavailable), remaining class IDs in the same extension still get processed. Both catch blocks log via \Logger.LogError\ with the extension display name and error message. The \InstallPackageUnderLock\ code path also calls \CreateWrappersForExtension\ and inherits the inner protection automatically. ## Validation Steps Performed - Built \Microsoft.CmdPal.UI.ViewModels\ with \ ools/build/build.cmd\ — exit code 0, no warnings or errors - Verified no existing tests are broken by the change Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
5520ae4cfa |
[PowerDisplay] Fix startup restore, volume init, and identify window lifecycle (#47051)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - **Volume initialization**: Read VCP 0x62 on monitor discovery so `CurrentVolume` reflects actual hardware state instead of staying at the 50% default. - **Brightness capability check**: Guard brightness init behind `SupportsBrightness` flag, consistent with contrast/volume handling. - **IdentifyWindow lifecycle**: Replace fire-and-forget `Task.Delay` with `DispatcherQueueTimer` (UI-thread-safe, stoppable on dispose). Swap `Activate`/`PositionOnDisplay` order to eliminate first-show flicker. - **Startup restore fix**: Change `MonitorStateEntry` fields to `int?` so unset values (`null`) aren't confused with zero — prevents writing default 0% brightness/volume to hardware on startup. - **Restore/profile apply refactor**: Push value validation down to `Set*Async` (continuous → `Math.Clamp`, discrete → capabilities check), extract unified `TryRestore` helper, remove redundant `IsValueInRange` and `> 0` checks. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
beddc3b065 |
[ImageResizer] Fix JsonPropertyName forwarding in ObservableProperty generator (#47056)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This issue introduced by our recent WinUI 3 migration <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #47055 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Yu Leng <yuleng@microsoft.com> Co-authored-by: Claude Opus 4 <noreply@anthropic.com> |
||
|
|
befb5c672e |
Fix AdvancedPaste auto-copy failing on Electron/Chromium apps (#46486)
## Summary Fixes #46485 AdvancedPaste's auto-copy feature fails on Electron/Chromium-based apps (e.g. Microsoft Teams, VS Code, browsers) because `WM_COPY` is delivered successfully but silently ignored by these apps. ## Problem The auto-copy code sends `WM_COPY` via `SendMessageTimeout`. For standard Win32 controls this works, but Electron apps accept the message delivery without actually copying to clipboard. The code treated successful delivery as success and **never fell back to `SendInput` Ctrl+C**. ## Changes **`src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp`**: - **Changed retry logic**: Each attempt now tries both `WM_COPY` and `SendInput` Ctrl+C. If `WM_COPY` is delivered but clipboard is unchanged, it falls through to Ctrl+C instead of giving up. - **Extracted `poll_clipboard_sequence()` helper**: Reusable clipboard polling logic (checks `GetClipboardSequenceNumber` over N polls with configurable delay). - **Extracted `send_ctrl_c_input()` helper**: Sends Ctrl+C via `SendInput` with `CENTRALIZED_KEYBOARD_HOOK_DONT_TRIGGER_FLAG`. - **Improved logging**: Each strategy logs clearly whether it succeeded or fell through, making future debugging easier. ## Validation - [x] Manual testing with Microsoft Teams (Electron): auto-copy now works for selected text - [x] Standard Win32 apps (Notepad, etc.): `WM_COPY` still works on first try, no regression - [x] No new warnings or errors in build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
e4f98897ce |
Add window positioning and sizing with Alt+mouse button (#47024)
Re-creation of #46817 from an internal branch to work around stale code-scanning merge protection. ## Original PR See #46817 for full context, discussion, and review history. ## Summary This adds a new toy, GrabAndMove (previously WinPos), that allows dragging (left click) or resizing (right click) of windows while the Alt key is pressed. Closes: #269 ## PR Checklist - [x] Communication: discussed with core contributors - [ ] Tests: Added/updated and all pass - [ ] Localization: All end-user-facing strings can be localized - [ ] Dev docs: Added/updated --------- Co-authored-by: foxmsft <foxmsft@hotmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Muyuan Li (from Dev Box) <muyuanli@microsoft.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Alex Mihaiuc <amihaiuc@microsoft.com> |
||
|
|
be1e749574 |
Add telemetry support for CLI modules (#46872)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds comprehensive localization and telemetry support to the modules with CLI (FileLocksmith, Awake, ImageResizer), improving user experience for international users and enabling usage tracking for product insights. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
99ef5948b0 |
[PD] Fix thread safety, color temperature guard, and log accuracy (#47008)
Mark _disposed and _isDirty as volatile for correct cross-thread visibility. Guard color temperature apply/restore behind ShowColorTemperature to avoid writing unsupported VCP codes. Fix misleading log message in Settings UI profile apply path. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
1c7f3d832c |
[Text Extractor] Remove WPF-UI in favor of Fluent theming in WPF (#46218)
Replaces the `WPF-UI` dependency in Text Extractor with native WPF
Fluent theming (`ThemeMode="System"`), custom
`SubtleButtonStyle`/`SubtleToggleButtonStyle` control templates, and
Segoe Fluent Icons font — eliminating the third-party library while
retaining light/dark theme support.
## Summary of the Pull Request
- Drops `xmlns:ui` (WPF-UI) from `App.xaml` and `OCROverlay.xaml`
- Removes `Wpf.Ui.Appearance.SystemThemeWatcher.Watch()` call; replaced
by `ThemeMode="System"` on `<Application>`
- Defines inline `SubtleButtonStyle` and `SubtleToggleButtonStyle` using
WinUI-aligned resource brush names (`SubtleFillColorSecondaryBrush`,
`AccentFillColorDefaultBrush`, etc.)
- Replaces `<ui:SymbolIcon>` with `<TextBlock
FontFamily="{DynamicResource SymbolThemeFontFamily}">` using Unicode
glyph codes
- Background uses `SolidBackgroundFillColorBaseBrush` instead of
`ApplicationBackgroundBrush`
| Light | Dark |
|-------|------|
|

|

|
## PR Checklist
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
## Detailed Description of the Pull Request / Additional comments
Related: #46220
## Validation Steps Performed
Verified light and dark themes render correctly with proper accent
highlight on the active toggle button.
---------
Co-authored-by: Joe Finney <josephfinney@LIVE.COM>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
|
||
|
|
ff87dce4a4 |
[PD] Clean up PowerDisplay: fix resource leaks, remove dead code, and fix some bugs (#46979)
- Replace custom GetLastError P/Invoke with Marshal.GetLastWin32Error and add SetLastError=true - Fix resource leaks: dispose DpiSuppressor on window close, dispose MonitorViewModels on refresh, destroy unused small icon handle, wrap WMI outParams in using block - Remove unused code: IProfileService, ColorTemperatureHelper, ProfileHelper (Lib), CustomVcpValueMappingExtensions, IPCMessageAction, UpdatePropertySilently, LocalizedCodeNameProvider, bring_to_front, Constants.h - Convert recursive MccsCapabilitiesParser.TryParseEntry to iterative loop - Simplify ProfileService to static class - Use std::atomic for m_enabled flag in module interface - Change default activation shortcut to Win+Ctrl+Shift+P - Add null-coalescing fallback for ActivationShortcut property - Add PowerDisplay to ModuleHelper name mapping - Update GPO policy to target PowerToys 0.99.0 - Fix NamedPipeProcessor to break on pipe close and reduce log verbosity - Add ShortcutControl workaround in Settings UI <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Yu Leng <yuleng@microsoft.com> Co-authored-by: Claude Opus 4 <noreply@anthropic.com> |
||
|
|
758a60103c |
CmdPal: Include new transitive dependencies in SLNF (#46896)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds new transitive dependencies to Command Palette’s SLNF (UI tests -> UITestAutomation -> ...), and introduces a new SLNF that excludes UI tests entirely, making it leaner. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
f8cadbf7f0 |
Fix AlwaysOnTop sound playing when pin/unpin fails (#46910)
## Summary of the Pull Request
`ProcessCommand` played the pin/unpin sound unconditionally, regardless
of whether `SetWindowPos` succeeded. This caused spurious audio feedback
when targeting desktop, taskbar, task view, start menu, or elevated
windows from a non-elevated process.
Gate sound playback on actual state change:
```cpp
bool stateChanged = false;
// ...
if (UnpinTopmostWindow(window)) { stateChanged = true; /* ... */ }
// ...
if (PinTopmostWindow(window)) { stateChanged = true; /* ... */ }
// ...
if (stateChanged && AlwaysOnTopSettings::settings()->enableSound)
m_sound.Play(soundType);
```
## PR Checklist
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
## Detailed Description of the Pull Request / Additional comments
`PinTopmostWindow` and `UnpinTopmostWindow` already return `bool`
indicating success, and the existing code already branches on those
return values for bookkeeping and telemetry — but the sound playback at
the end of `ProcessCommand` ignored the result. Added a `stateChanged`
flag set only inside the success branches, then checked before calling
`m_sound.Play()`.
## Validation Steps Performed
- Verified that the `soundType` / `stateChanged` logic covers all four
paths: pin success, pin failure, unpin success, unpin failure.
- Code review passed with no comments.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
|
||
|
|
0819a6268b |
[CmdPal] Move dev docs to doc/devdocs/modules/cmdpal (#46926)
## Summary Move Command Palette developer documentation from \src/modules/cmdpal/doc\ to \doc/devdocs/modules/cmdpal\, consistent with the location of other module dev docs. Also updates the spell-check exclude path for the moved \.pdn\ file. Points 2 and 3 from the issue (extension settings how-to and details pane markdown documentation) are addressed in the windows-dev-docs-pr repo. Closes #38107 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
a31f82fcbd |
[CmdPal] Fix Window Walker 'Not Responding' tag illegible in dark mode (#46924)
## Summary The 'Not Responding' tag in Window Walker used a hardcoded crimson foreground color (rgb 220,20,60) that was illegible against the dark tag background in dark mode. **Fix:** Remove the hardcoded color override so the tag uses the default theme-aware TagForeground brush, which is legible in both light and dark modes. Closes #40219 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
daeb2e1ef4 |
Fix CmdPal Calc extension unit test failure in non-English cultures (#46911)
## Summary of the Pull Request `TrigModeSettingsTest` fails under cultures using `,` as decimal separator (e.g., `de-DE`, `fr-FR`). Two root causes: the C++ calculator engine's `ToWStringFullPrecision` doesn't pin the stream locale, and the test classes don't set a deterministic thread culture. ## PR Checklist - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated ## Detailed Description of the Pull Request / Additional comments **C++ locale fix** — `ExprtkEvaluator.cpp`: `std::wostringstream` defaults to the global C++ locale, which can be changed to the system locale by the runtime. Pin it to `std::locale::classic()` so the decimal separator is always `.` across the WinRT boundary: ```cpp std::wostringstream oss; oss.imbue(std::locale::classic()); oss << std::fixed << std::setprecision(15) << value; ``` **Test culture setup** — `QueryTests.cs`, `QueryHelperTests.cs`: Added `TestInitialize`/`TestCleanup` to set thread culture to `en-US`, matching the existing pattern across all TimeDate test classes. **Non-English culture test cases** — New `TrigModeSettingsTest_NonEnglishCulture` parameterized over `de-DE` and `fr-FR` verifies `outputUseEnglishFormat: true` produces `.`-separated output regardless of `CurrentCulture`. ## Validation Steps Performed - Code review passed with no actionable findings (naming convention matches existing TimeDate test pattern across 7+ files) - New `TrigModeSettingsTest_NonEnglishCulture` test exercises the exact failure scenario from the issue --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> |
||
|
|
0089de33bd |
[PD] Re-enable PowerDisplay (#46489)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request 1. Re-enable PowerDisplay for PowerToys. 2. Add PowerDisplay back into installer. 3. Use new PowerDisplay icon and logo. 4. Fix some DPI related issue. 5. UI/UX improvement. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #1052 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Pull new code from this branch. Set up PowerDisplay.UI as startup project. Click run in VS. Or, build whole solution, set up runner as startup project. Click run to test full experience. --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Niels Laute <niels.laute@live.nl> |
||
|
|
3e2914a0b2 |
Add unit tests for Hosts ValidationHelper and ColorPicker format conversions (#46679)
## Summary of the Pull Request Adds comprehensive unit tests for two previously untested areas to improve test coverage and prevent regressions: 1. **Hosts ValidationHelper** (`ValidationHelperTest.cs`) — 25+ test cases covering `ValidIPv4`, `ValidIPv6`, and `ValidHosts` methods 2. **ColorPicker ColorFormatHelper conversions** (`ColorFormatConversionTest.cs`) — 50+ test cases covering CMYK, HSB, HSI, HWB, CIE XYZ, CIE LAB, Oklab, Oklch, sRGB-to-linear, NCol conversions, plus expanded `GetStringRepresentation` tests for Red, White, Green, and Blue colors across all supported formats ## PR Checklist - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized — N/A (test-only changes) - [ ] **Dev docs:** Added/updated — N/A (test-only changes) - [ ] **New binaries:** Added on the required places — N/A (no new binaries) ## Detailed Description of the Pull Request / Additional comments ### Hosts ValidationHelper (`src/modules/Hosts/Hosts.Tests/ValidationHelperTest.cs`) - Tests `ValidIPv4` with valid addresses (loopback, private ranges, broadcast), invalid addresses (out of range octets, wrong format, CIDR notation), and null/whitespace inputs - Tests `ValidIPv6` with valid addresses (loopback, full/compressed notation, link-local, IPv4-mapped), invalid addresses (extra groups, invalid hex digits), and null/whitespace inputs - Tests `ValidHosts` with valid hostnames, FQDNs, max host count boundary (using `Consts.MaxHostsCount` dynamically for both exact-boundary and exceeds-boundary tests), and invalid hostnames ### ColorPicker Format Conversions (`src/modules/colorPicker/ColorPickerUI.UnitTests/Helpers/ColorFormatConversionTest.cs`) - Tests `ConvertToCMYKColor` for Black, White, Red, Green, Blue, and Mid Gray - Tests `ConvertToHSBColor`, `ConvertToHSIColor`, `ConvertToHWBColor` for primary colors - Tests `ConvertToCIEXYZColor` and `ConvertToCIELABColor` including D65 illuminant verification and negative b* assertion for Blue - Tests `ConvertToOklabColor` and `ConvertToOklchColor` including chroma non-negativity - Tests `ConvertSRGBToLinearRGB` for linear and gamma paths - Tests `ConvertToNaturalColor` for hue letter mapping (R exact match, G and B prefix assertions) - Tests `GetStringRepresentation` with Red, White, Green, Blue across all 11+ format types (Decimal values use BGR byte order via `%Dv` format: Red → "255", Blue → "16711680") - Tests `GetDefaultFormat` returns non-empty strings for all known format names - Tests edge cases: empty/null format strings defaulting to hex output ### Spell-check allow list - Added `SRGBTo` to `.github/actions/spell-check/allow/code.txt` to resolve unrecognized-spelling alerts ### StyleCop / code analysis fixes - Resolved SA1512, SA1515, CA1866, and CA1310 analyzer warnings to comply with repo coding standards ### Code review fixes - Renamed `ConvertToCIELAB_Blue_HasNegativeA` → `ConvertToCIELAB_Blue_HasNegativeB` with corrected comment to match the actual b* axis assertion - Replaced hardcoded 12-host string with dynamic `Consts.MaxHostsCount + 1` in the exceeds-max-count boundary test - Renamed `ConvertToNaturalColor_Green_ReturnsG0` → `ConvertToNaturalColor_Green_HueStartsWithG` and `ConvertToNaturalColor_Blue_ReturnsB0` → `ConvertToNaturalColor_Blue_HueStartsWithB` to accurately reflect prefix-only assertions ## Validation Steps Performed - Verified test files follow existing MSTest patterns (`[TestClass]`, `[TestMethod]`, `[DataTestMethod]`, `[DataRow]`) - Verified all referenced classes and methods exist and are accessible (correct namespaces and visibility) - Verified namespace consistency with existing test files in each project - Used dynamic `Consts.MaxHostsCount` rather than hardcoded values for all boundary tests - Verified Decimal format expected values match the `%Dv` (BGR order) implementation: `R + G*256 + B*65536` - Verified test method names accurately describe their assertions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com> |