diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 5053f9a7c6e..cfed8b7c87f 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -266,6 +266,7 @@ CSettings cso CSRW CStyle +cswinrt CSY CTest currentculture diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index f41817bbf60..4a914c64657 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -236,11 +236,22 @@ configuration: - if: - payloadType: Issue_Comment - commentContains: - pattern: 'I would [like|love] [to help|helping|to contribute|contributing|to implement|implementing|to fix|fixing]' + pattern: "I(( would|'d) (like|love|be happy)| want) (to help|helping|to contribute|contributing|to implement|implementing|to fix|fixing)" isRegex: True then: - addReply: reply: Hi! Your last comment indicates to our system, that you might want to contribute to this feature/fix this bug. Thank you! Please make us aware on our ["Would you like to contribute to PowerToys?" thread](https://github.com/microsoft/PowerToys/issues/28769), as we don't see all the comments.

_I'm a bot (beep!) so please excuse any mistakes I may make_ + description: + - if: + - payloadType: Issues + - isAction: + action: Opened + - bodyContains: + pattern: 'Area\(s\) with issue\?\s*\nWorkspaces' + isRegex: True + then: + - addLabel: + label: Product-Workspaces description: onFailure: onSuccess: diff --git a/.vsconfig b/.vsconfig index 5d2ef574531..bc5f1200fc1 100644 --- a/.vsconfig +++ b/.vsconfig @@ -7,7 +7,7 @@ "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Workload.Universal", "Microsoft.VisualStudio.Component.Windows10SDK.19041", - "Microsoft.VisualStudio.Component.Windows10SDK.20348", + "Microsoft.VisualStudio.Component.Windows10SDK.22621", "Microsoft.VisualStudio.ComponentGroup.UWP.VC", "Microsoft.VisualStudio.Component.UWP.VC.ARM64", "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", diff --git a/Cpp.Build.props b/Cpp.Build.props index 4f920f036f8..06c22b45bf8 100644 --- a/Cpp.Build.props +++ b/Cpp.Build.props @@ -94,17 +94,16 @@ - - - 10.0.20348.0 - 10.0.20348.0 + + + 10.0.22621.0 + 10.0.22621.0 10.0.19041.0 - v143 + v143 Unicode true Spectre diff --git a/Directory.Packages.props b/Directory.Packages.props index 1c92bb76225..9e862348bed 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + @@ -33,15 +33,19 @@ - + - + + - + diff --git a/NOTICE.md b/NOTICE.md index b7f8df1dfda..ca957e45ecd 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1299,14 +1299,14 @@ EXHIBIT A -Mozilla Public License. - Appium.WebDriver 4.4.5 - Azure.AI.OpenAI 1.0.0-beta.12 - CommunityToolkit.Mvvm 8.2.2 -- CommunityToolkit.WinUI.Animations 8.0.240109 -- CommunityToolkit.WinUI.Collections 8.0.240109 -- CommunityToolkit.WinUI.Controls.Primitives 8.0.240109 -- CommunityToolkit.WinUI.Controls.Segmented 8.0.240109 -- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.240109 -- CommunityToolkit.WinUI.Controls.Sizers 8.0.240109 -- CommunityToolkit.WinUI.Converters 8.0.240109 -- CommunityToolkit.WinUI.Extensions 8.0.240109 +- CommunityToolkit.WinUI.Animations 8.1.240821 +- CommunityToolkit.WinUI.Collections 8.1.240821 +- CommunityToolkit.WinUI.Controls.Primitives 8.1.240821 +- CommunityToolkit.WinUI.Controls.Segmented 8.1.240821 +- CommunityToolkit.WinUI.Controls.SettingsControls 8.1.240821 +- CommunityToolkit.WinUI.Controls.Sizers 8.1.240821 +- CommunityToolkit.WinUI.Converters 8.1.240821 +- CommunityToolkit.WinUI.Extensions 8.1.240821 - CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2 - CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2 - ControlzEx 6.0.0 @@ -1325,13 +1325,13 @@ EXHIBIT A -Mozilla Public License. - Microsoft.Extensions.Logging 8.0.0 - Microsoft.Extensions.Logging.Abstractions 8.0.0 - Microsoft.Toolkit.Uwp.Notifications 7.1.2 -- Microsoft.Web.WebView2 1.0.2365.46 +- Microsoft.Web.WebView2 1.0.2739.15 - Microsoft.Win32.SystemEvents 8.0.0 - Microsoft.Windows.Compatibility 8.0.7 - Microsoft.Windows.CsWin32 0.2.46-beta -- Microsoft.Windows.CsWinRT 2.0.8 +- Microsoft.Windows.CsWinRT 2.1.1 - Microsoft.Windows.SDK.BuildTools 10.0.22621.2428 -- Microsoft.WindowsAppSDK 1.5.240428000 +- Microsoft.WindowsAppSDK 1.6.240829007 - Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9 - Microsoft.Xaml.Behaviors.Wpf 1.1.39 - ModernWpfUI 0.9.4 diff --git a/README.md b/README.md index ec4fb1ed89d..7bdc0becf09 100644 --- a/README.md +++ b/README.md @@ -43,17 +43,17 @@ Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and cl [github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.85%22 [github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.84%22 -[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.0/PowerToysUserSetup-0.84.0-x64.exe -[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.0/PowerToysUserSetup-0.84.0-arm64.exe -[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.0/PowerToysSetup-0.84.0-x64.exe -[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.0/PowerToysSetup-0.84.0-arm64.exe +[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysUserSetup-0.84.1-x64.exe +[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysUserSetup-0.84.1-arm64.exe +[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysSetup-0.84.1-x64.exe +[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysSetup-0.84.1-arm64.exe | Description | Filename | sha256 hash | |----------------|----------|-------------| -| Per user - x64 | [PowerToysUserSetup-0.84.0-x64.exe][ptUserX64] | 6792180D697ED9FDF9AA7B3F0AB92767CF4C79B526715C802F545E2DCB201BE3 | -| Per user - ARM64 | [PowerToysUserSetup-0.84.0-arm64.exe][ptUserArm64] | 3D071F009B5E3DBAD21D7450ADB53CBC85CAFB21016E44F414E2A03C188D2FAF | -| Machine wide - x64 | [PowerToysSetup-0.84.0-x64.exe][ptMachineX64] | 67B7E685AAF635803A87D8EE96CA1AF5024910B0BF00A9277CD77C810D049446 | -| Machine wide - ARM64 | [PowerToysSetup-0.84.0-arm64.exe][ptMachineArm64] | 259DA1EFB33A616CF64840B8D8AB84F86A43F61687578B43849D5DE11F77AF82 | +| Per user - x64 | [PowerToysUserSetup-0.84.1-x64.exe][ptUserX64] | 1CDAF3482B031D84DAE15188DE292FB44C5D211698089921040D94B256EBD3CA | +| Per user - ARM64 | [PowerToysUserSetup-0.84.1-arm64.exe][ptUserArm64] | E0207EF5147EE281D4F438E87A30586D8CAA24DE948950FF1B12E05454622CD9 | +| Machine wide - x64 | [PowerToysSetup-0.84.1-x64.exe][ptMachineX64] | 10DF9774DE1857051E135B9790A18A92C5C7F42587C733DEE991186E67231EE0 | +| Machine wide - ARM64 | [PowerToysSetup-0.84.1-arm64.exe][ptMachineArm64] | EB5DDA5EFBA17E813DBF24AFF668DDF5424ED3659234ABBC15441D478D812699 | This is our preferred method. diff --git a/src/Common.Dotnet.CsWinRT.props b/src/Common.Dotnet.CsWinRT.props index a9cd70ffa33..514997e71bf 100644 --- a/src/Common.Dotnet.CsWinRT.props +++ b/src/Common.Dotnet.CsWinRT.props @@ -2,7 +2,8 @@ - net8.0-windows10.0.20348.0 + 10.0.22621.38 + net8.0-windows10.0.22621.0 10.0.19041.0 10.0.19041.0 win-x64;win-arm64 @@ -33,4 +34,11 @@ + + + + +    + + \ No newline at end of file diff --git a/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs b/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs index 6225ad36b38..0ef11233dc8 100644 --- a/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs +++ b/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs @@ -10,11 +10,11 @@ using Microsoft.Diagnostics.Tracing.Session; using Microsoft.PowerToys.Telemetry; -namespace WSACrashHelper +namespace Microsoft.PowerToys.Telemetry { /// /// This class is based loosely on the C++ ETWTrace class in Win32client/Framework project. - /// It is intended to record telemetry events generated by the WSACrashUploader so that end users + /// It is intended to record telemetry events generated by the PowerToys processes so that end users /// can view them if they want. /// public class ETWTrace : IDisposable diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.cpp b/src/common/Telemetry/EtwTrace/EtwTrace.cpp index ef50fff9af8..dfe91b980ad 100644 --- a/src/common/Telemetry/EtwTrace/EtwTrace.cpp +++ b/src/common/Telemetry/EtwTrace/EtwTrace.cpp @@ -14,6 +14,9 @@ namespace fs = std::filesystem; namespace { + constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys"; + constexpr inline const wchar_t* ViewDataDiagnosticsRegValueName = L"DataDiagnosticsViewEnabled"; + inline std::wstring get_root_save_folder_location() { PWSTR local_app_path; @@ -29,12 +32,51 @@ namespace } return result; } + + bool isViewDataDiagnosticEnabled() + { + HKEY key{}; + if (RegOpenKeyExW(HKEY_CURRENT_USER, + DataDiagnosticsRegKey, + 0, + KEY_READ, + &key) != ERROR_SUCCESS) + { + return false; + } + + DWORD isDataDiagnosticsEnabled = 0; + DWORD size = sizeof(isDataDiagnosticsEnabled); + + if (RegGetValueW( + HKEY_CURRENT_USER, + DataDiagnosticsRegKey, + ViewDataDiagnosticsRegValueName, + RRF_RT_REG_DWORD, + nullptr, + &isDataDiagnosticsEnabled, + &size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return false; + } + RegCloseKey(key); + + return isDataDiagnosticsEnabled; + } + } namespace Shared { namespace Trace { + ETWTrace::ETWTrace() : + ETWTrace(PowerToysProviderGUID) + { + + } + ETWTrace::ETWTrace(const std::wstring& providerGUIDstr) { GUID id; @@ -161,6 +203,11 @@ namespace Shared return; } + if (!isViewDataDiagnosticEnabled()) + { + return; + } + CreateEtwFolderIfNeeded(); InitEventTraceProperties(); diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.h b/src/common/Telemetry/EtwTrace/EtwTrace.h index bbc61dbfa8a..69c08acec85 100644 --- a/src/common/Telemetry/EtwTrace/EtwTrace.h +++ b/src/common/Telemetry/EtwTrace/EtwTrace.h @@ -15,6 +15,9 @@ namespace Shared class ETWTrace { public: + static inline const wchar_t* PowerToysProviderGUID = L"{38e8889b-9731-53f5-e901-e8a7c1753074}"; + + ETWTrace(); ETWTrace(const std::wstring& providerGUID); ETWTrace(const GUID& providerGUID); ~ETWTrace(); diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/AnimatedContentControl/AnimatedContentControl.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/AnimatedContentControl/AnimatedContentControl.cs index eda04a5d537..3a5cb8c602e 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/AnimatedContentControl/AnimatedContentControl.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/AnimatedContentControl/AnimatedContentControl.cs @@ -9,7 +9,7 @@ namespace AdvancedPaste.Controls { [TemplatePart(Name = LoadingGrid, Type = typeof(Grid))] [TemplatePart(Name = LoadingBrush, Type = typeof(AnimatedBorderBrush))] - public class AnimatedContentControl : ContentControl + public partial class AnimatedContentControl : ContentControl { internal const string LoadingGrid = "PART_LoadingGrid"; internal const string LoadingBrush = "PART_LoadingBrush"; diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToDoubleConverter.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToDoubleConverter.cs index 5226bf320dc..0577c019f73 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToDoubleConverter.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToDoubleConverter.cs @@ -8,7 +8,7 @@ namespace AdvancedPaste.Converters; -public sealed class CountToDoubleConverter : IValueConverter +public sealed partial class CountToDoubleConverter : IValueConverter { public double ValueIfZero { get; set; } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToVisibilityConverter.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToVisibilityConverter.cs index 41b3968e03d..67889d3af98 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToVisibilityConverter.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/CountToVisibilityConverter.cs @@ -9,7 +9,7 @@ namespace AdvancedPaste.Converters; -public sealed class CountToVisibilityConverter : IValueConverter +public sealed partial class CountToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj index 38aeae785bc..89177bd56f2 100644 --- a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj +++ b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj @@ -10,7 +10,7 @@ {f5e1146e-b7b3-4e11-85fd-270a500bd78c} Win32Proj CropAndLock - 10.0.20348.0 + 10.0.22621.0 10.0.19041.0 diff --git a/src/modules/CropAndLock/CropAndLock/main.cpp b/src/modules/CropAndLock/CropAndLock/main.cpp index d90b75eaef5..3fd18cdaa8c 100644 --- a/src/modules/CropAndLock/CropAndLock/main.cpp +++ b/src/modules/CropAndLock/CropAndLock/main.cpp @@ -37,9 +37,6 @@ bool m_running = true; int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _In_ int) { - Shared::Trace::ETWTrace trace{ L"{38e8889b-9731-53f5-e901-e8a7c1753074}" }; - trace.UpdateState(true); - // Initialize COM winrt::init_apartment(winrt::apartment_type::single_threaded); @@ -202,6 +199,9 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I } m_event_triggers_thread = std::thread([&]() { + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + MSG msg; HANDLE event_handles[3] = {m_reparent_event_handle, m_thumbnail_event_handle, m_exit_event_handle}; while (m_running) @@ -255,6 +255,8 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I break; } } + trace.Flush(); + trace.UpdateState(false); }); // Message pump @@ -273,8 +275,5 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I CloseHandle(m_exit_event_handle); m_event_triggers_thread.join(); - trace.UpdateState(false); - trace.Flush(); - return util::ShutdownDispatcherQueueControllerAndWait(controller, static_cast(msg.wParam)); } diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToBoolConverter.cs b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToBoolConverter.cs index 95aae3e8744..41a6b31fd7a 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToBoolConverter.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToBoolConverter.cs @@ -8,7 +8,7 @@ namespace EnvironmentVariablesUILib.Converters; -public class EnvironmentStateToBoolConverter : IValueConverter +public partial class EnvironmentStateToBoolConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToMessageConverter.cs b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToMessageConverter.cs index 5f1103fe21f..d505a29d78a 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToMessageConverter.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToMessageConverter.cs @@ -9,7 +9,7 @@ namespace EnvironmentVariablesUILib.Converters; -public class EnvironmentStateToMessageConverter : IValueConverter +public partial class EnvironmentStateToMessageConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToTitleConverter.cs b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToTitleConverter.cs index dbe2843919d..be2f03175e8 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToTitleConverter.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToTitleConverter.cs @@ -9,7 +9,7 @@ namespace EnvironmentVariablesUILib.Converters; -public class EnvironmentStateToTitleConverter : IValueConverter +public partial class EnvironmentStateToTitleConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToVisibilityConverter.cs b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToVisibilityConverter.cs index 4c2d2b42dab..5fb1313ad22 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToVisibilityConverter.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/EnvironmentStateToVisibilityConverter.cs @@ -9,7 +9,7 @@ namespace EnvironmentVariablesUILib.Converters; -public class EnvironmentStateToVisibilityConverter : IValueConverter +public partial class EnvironmentStateToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/VariableTypeToGlyphConverter.cs b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/VariableTypeToGlyphConverter.cs index 41cf4124cb7..216a914bea5 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/VariableTypeToGlyphConverter.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Converters/VariableTypeToGlyphConverter.cs @@ -8,7 +8,7 @@ namespace EnvironmentVariablesUILib.Converters; -public class VariableTypeToGlyphConverter : IValueConverter +public partial class VariableTypeToGlyphConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj b/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj index 8d33e3f543f..c4489cdad88 100644 --- a/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj +++ b/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj @@ -25,7 +25,7 @@ {c604b37e-9d0e-4484-8778-e8b31b0e1b3a} PowerToys.FileLocksmithLib.Interop PowerToys.FileLocksmithLib.Interop - net8.0-windows10.0.20348.0 + net8.0-windows10.0.22621.0 ..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\ PowerToys.FileLocksmithLib.Interop diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileCountConverter.cs b/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileCountConverter.cs index 43bf8c9a590..423c4f04b0d 100644 --- a/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileCountConverter.cs +++ b/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileCountConverter.cs @@ -4,11 +4,10 @@ using System; using Microsoft.UI.Xaml.Data; -using PowerToys.FileLocksmithLib.Interop; namespace PowerToys.FileLocksmithUI.Converters { - public sealed class FileCountConverter : IValueConverter + public sealed partial class FileCountConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileListToDescriptionConverter.cs b/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileListToDescriptionConverter.cs index fcde399f4ae..a81a03fb52d 100644 --- a/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileListToDescriptionConverter.cs +++ b/src/modules/FileLocksmith/FileLocksmithUI/Converters/FileListToDescriptionConverter.cs @@ -5,11 +5,10 @@ using System; using System.IO; using Microsoft.UI.Xaml.Data; -using PowerToys.FileLocksmithLib.Interop; namespace PowerToys.FileLocksmithUI.Converters { - public sealed class FileListToDescriptionConverter : IValueConverter + public sealed partial class FileListToDescriptionConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Converters/PidToIconConverter.cs b/src/modules/FileLocksmith/FileLocksmithUI/Converters/PidToIconConverter.cs index c5b03a7d2b8..deec381fcb2 100644 --- a/src/modules/FileLocksmith/FileLocksmithUI/Converters/PidToIconConverter.cs +++ b/src/modules/FileLocksmith/FileLocksmithUI/Converters/PidToIconConverter.cs @@ -7,11 +7,10 @@ using System.IO; using Microsoft.UI.Xaml.Data; using Microsoft.UI.Xaml.Media.Imaging; -using Windows.Storage; namespace PowerToys.FileLocksmithUI.Converters { - public sealed class PidToIconConverter : IValueConverter + public sealed partial class PidToIconConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Converters/UserToSystemWarningVisibilityConverter.cs b/src/modules/FileLocksmith/FileLocksmithUI/Converters/UserToSystemWarningVisibilityConverter.cs index 85b988dbe34..10e071563ae 100644 --- a/src/modules/FileLocksmith/FileLocksmithUI/Converters/UserToSystemWarningVisibilityConverter.cs +++ b/src/modules/FileLocksmith/FileLocksmithUI/Converters/UserToSystemWarningVisibilityConverter.cs @@ -3,14 +3,12 @@ // See the LICENSE file in the project root for more information. using System; -using System.Globalization; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; -using PowerToys.FileLocksmithLib.Interop; namespace PowerToys.FileLocksmithUI.Converters { - public sealed class UserToSystemWarningVisibilityConverter : IValueConverter + public sealed partial class UserToSystemWarningVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml b/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml index 800c6473ca7..dc3af21ceae 100644 --- a/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml +++ b/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem - net8.0-windows10.0.20348.0 + net8.0-windows10.0.22621.0 10.0.19041.0 10.0.19041.0 $(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj index 1189b7c08cc..444657646e3 100644 --- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj +++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj @@ -1,6 +1,6 @@  - + @@ -21,10 +21,6 @@ false Windows Store 10.0 - true - - 10.0.20348.0 - 10.0.19041.0 true true true @@ -141,7 +137,8 @@ - + + @@ -152,7 +149,8 @@ - - + + + \ No newline at end of file diff --git a/src/modules/MeasureTool/MeasureToolCore/packages.config b/src/modules/MeasureTool/MeasureToolCore/packages.config index 2b320c8c166..7043c92ee0f 100644 --- a/src/modules/MeasureTool/MeasureToolCore/packages.config +++ b/src/modules/MeasureTool/MeasureToolCore/packages.config @@ -1,7 +1,8 @@  + - + \ No newline at end of file diff --git a/src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs b/src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs index 3c229743957..1212dd81949 100644 --- a/src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs +++ b/src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs @@ -56,6 +56,11 @@ public MainWindow(PowerToys.MeasureToolCore.Core core) this.SetIsMaximizable(false); IsTitleBarVisible = false; + // 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); + _ = SetWindowLong(hwnd, GWL_STYLE, windowStyle); + _coreLogic = core; Closed += MainWindow_Closed; DisplayArea displayArea = DisplayArea.GetFromWindowId(windowId, DisplayAreaFallback.Nearest); diff --git a/src/modules/MeasureTool/MeasureToolUI/NativeMethods.cs b/src/modules/MeasureTool/MeasureToolUI/NativeMethods.cs index 877adf54e1b..92c061a6cc2 100644 --- a/src/modules/MeasureTool/MeasureToolUI/NativeMethods.cs +++ b/src/modules/MeasureTool/MeasureToolUI/NativeMethods.cs @@ -15,4 +15,13 @@ internal static class NativeMethods internal const uint SWP_NOMOVE = 0x0002; internal const uint SWP_NOACTIVATE = 0x0010; internal const uint SWP_SHOWWINDOW = 0x0040; + + [DllImport("user32.dll", SetLastError = true)] + internal static extern int GetWindowLong(IntPtr hWnd, int nIndex); + + [DllImport("user32.dll")] + internal static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); + + internal const int GWL_STYLE = -16; + internal const int WS_CAPTION = 0x00C00000; } diff --git a/src/modules/Workspaces/WorkspacesEditor/MainPage.xaml b/src/modules/Workspaces/WorkspacesEditor/MainPage.xaml index 8ea28b9edfc..aa2ec3f6d18 100644 --- a/src/modules/Workspaces/WorkspacesEditor/MainPage.xaml +++ b/src/modules/Workspaces/WorkspacesEditor/MainPage.xaml @@ -150,6 +150,7 @@ Width="140" Background="{DynamicResource SecondaryBackgroundBrush}" BorderBrush="{DynamicResource PrimaryBorderBrush}" + BorderThickness="2" SelectedIndex="{Binding OrderByIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> @@ -307,7 +308,7 @@ AutomationProperties.Name="{x:Static props:Resources.Launch}" Background="{DynamicResource TertiaryBackgroundBrush}" BorderBrush="{DynamicResource SecondaryBorderBrush}" - BorderThickness="1" + BorderThickness="2" Click="LaunchButton_Click" Content="{x:Static props:Resources.Launch}" /> diff --git a/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditorPage.xaml b/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditorPage.xaml index a9f352b29e0..bb8c373f507 100644 --- a/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditorPage.xaml +++ b/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditorPage.xaml @@ -109,6 +109,8 @@ Padding="24,6" AutomationProperties.Name="{x:Static props:Resources.Delete}" Background="{DynamicResource TertiaryBackgroundBrush}" + BorderBrush="{DynamicResource SecondaryBorderBrush}" + BorderThickness="2" Click="DeleteButtonClicked" Content="{Binding DeleteButtonContent, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="True" /> @@ -338,6 +340,8 @@ HorizontalAlignment="Right" AutomationProperties.Name="{x:Static props:Resources.Revert}" Background="{DynamicResource SecondaryBackgroundBrush}" + BorderBrush="{DynamicResource PrimaryBorderBrush}" + BorderThickness="2" Click="RevertButtonClicked" Content="{x:Static props:Resources.Revert}" DockPanel.Dock="Right" @@ -350,6 +354,8 @@ HorizontalAlignment="Right" AutomationProperties.Name="{x:Static props:Resources.LaunchEdit}" Background="{DynamicResource SecondaryBackgroundBrush}" + BorderBrush="{DynamicResource PrimaryBorderBrush}" + BorderThickness="2" Click="LaunchEditButtonClicked" Content="{x:Static props:Resources.LaunchEdit}" DockPanel.Dock="Right" /> @@ -402,6 +408,8 @@ Padding="24,0,24,0" AutomationProperties.Name="{x:Static props:Resources.Cancel}" Background="{DynamicResource SecondaryBackgroundBrush}" + BorderBrush="{DynamicResource PrimaryBorderBrush}" + BorderThickness="2" Click="CancelButtonClicked" Content="{x:Static props:Resources.Cancel}" />