Compare commits

...

7 Commits

Author SHA1 Message Date
Shawn Yuan (from Dev Box)
a9585f1d37 remove pdispaly 2026-02-06 15:03:00 +08:00
Shawn Yuan (from Dev Box)
9ecf1da045 update 2026-02-06 15:01:12 +08:00
Shawn Yuan (from Dev Box)
62ec8ee50e remove pdsplay 2026-02-06 14:56:56 +08:00
Shawn Yuan (from Dev Box)
13a6bf1f0b add try catch for measure tool 2026-02-06 14:42:01 +08:00
vanzue
b8aa0a6890 winui taskswitch assignment crashes winui 2026-02-06 14:14:34 +08:00
Shawn Yuan (from Dev Box)
4de28416be fix winuiEx crash issue 2026-02-06 13:18:29 +08:00
Jiří Polášek
753689309e CmdPal: Fix alias UI clearing when toggling Direct/Indirect combobox (#45381)
## Summary of the Pull Request

This PR fixes the settings UI for the top-level command alias.



<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist


https://github.com/user-attachments/assets/0d1e1392-0293-4482-97cb-e8e8c0ed0dd5


- [x] Closes: #41301
<!-- - [ ] 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
2026-02-05 16:47:45 -06:00
5 changed files with 24 additions and 5 deletions

View File

@@ -10,7 +10,6 @@
IsMaximizable="False"
IsMinimizable="False"
IsResizable="False"
IsShownInSwitchers="False"
IsTitleBarVisible="False"
mc:Ignorable="d">
<winuiex:WindowEx.Backdrop>

View File

@@ -52,12 +52,23 @@ namespace MeasureToolUI
var presenter = _appWindow.Presenter as OverlappedPresenter;
presenter.IsAlwaysOnTop = true;
this.SetIsAlwaysOnTop(true);
this.SetIsShownInSwitchers(false);
this.SetIsResizable(false);
this.SetIsMinimizable(false);
this.SetIsMaximizable(false);
IsTitleBarVisible = false;
try
{
this.SetIsShownInSwitchers(false);
}
catch (NotImplementedException)
{
// WinUI will throw if explorer is not running, safely ignore
}
catch (Exception)
{
}
// Remove the caption style from the window style. Windows App SDK 1.6 added it, which made the title bar and borders appear for Measure Tool. This code removes it.
var windowStyle = GetWindowLong(hwnd, GWL_STYLE);
windowStyle = windowStyle & (~WS_CAPTION);

View File

@@ -107,7 +107,7 @@ public partial class AliasManager : ObservableObject
}
// Look for the alias belonging to another command, and remove it
if (newAlias is not null && kv.Value.Alias == newAlias.Alias)
if (newAlias is not null && kv.Value.Alias == newAlias.Alias && kv.Value.CommandId != commandId)
{
toRemove.Add(kv.Value);

View File

@@ -15,7 +15,6 @@
IsMaximizable="False"
IsMinimizable="False"
IsResizable="False"
IsShownInSwitchers="False"
IsTitleBarVisible="False"
mc:Ignorable="d">
<winuiEx:WindowEx.Backdrop>

View File

@@ -305,7 +305,17 @@ public sealed partial class MainWindow : WindowEx, IDisposable
return;
}
_appWindow.IsShownInSwitchers = false;
try
{
_appWindow.IsShownInSwitchers = false;
}
catch (NotImplementedException)
{
// WinUI Will throw if explorer is not running, safely ignore
}
catch (Exception)
{
}
}
private bool CloakWindow()