From 3cdb30c647c976fef6ca4ddf5a64a7edcf70b6a1 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:48:47 +0200 Subject: [PATCH 01/54] [NewPlus]Set package version in CI (#35080) --- .pipelines/versionSetting.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pipelines/versionSetting.ps1 b/.pipelines/versionSetting.ps1 index fa37bfbcd7..7221392195 100644 --- a/.pipelines/versionSetting.ps1 +++ b/.pipelines/versionSetting.ps1 @@ -67,3 +67,12 @@ $fileLocksmithContextMenuAppManifestReadFileLocation = $fileLocksmithContextMenu $fileLocksmithContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0' Write-Host "FileLocksmithContextMenu version" $fileLocksmithContextMenuAppManifest.Package.Identity.Version $fileLocksmithContextMenuAppManifest.Save($fileLocksmithContextMenuAppManifestWriteFileLocation); + +# Set NewPlusContextMenu package version in AppManifest.xml +$newPlusContextMenuAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/NewPlus/NewShellExtensionContextMenu/AppxManifest.xml'; +$newPlusContextMenuAppManifestReadFileLocation = $newPlusContextMenuAppManifestWriteFileLocation; + +[XML]$newPlusContextMenuAppManifest = Get-Content $newPlusContextMenuAppManifestReadFileLocation +$newPlusContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0' +Write-Host "NewPlusContextMenu version" $newPlusContextMenuAppManifest.Package.Identity.Version +$newPlusContextMenuAppManifest.Save($newPlusContextMenuAppManifestWriteFileLocation); From 49a828236abef483968cf6db5f7c84ee0015b99e Mon Sep 17 00:00:00 2001 From: Den Delimarsky Date: Thu, 26 Sep 2024 07:25:30 -0700 Subject: [PATCH 02/54] [Awake]PROMETHEAN_09082024 - tray icon fixes (#34717) * Update with bug fixes for tray icon and support for parent process * Process information enum * Update the docs * Fix spelling * Make sure that PID is used in PT config flow * Logic for checks based on #34148 * Update with link to PR * Small cleanup * Proper task segmentation in a function * Cleanup the code * Fix synchronization context issue * Update planning doc * Test disabling caching to see if that manages to pass CI --- .pipelines/v2/ci.yml | 2 +- doc/planning/awake.md | 23 +- src/modules/awake/Awake/Core/Constants.cs | 2 +- .../SingleThreadSynchronizationContext.cs | 24 +- src/modules/awake/Awake/Core/TrayHelper.cs | 216 +++++++++-------- src/modules/awake/Awake/Program.cs | 224 ++++++++++-------- 6 files changed, 260 insertions(+), 231 deletions(-) rename src/modules/awake/Awake/Core/{Models => Threading}/SingleThreadSynchronizationContext.cs (61%) diff --git a/.pipelines/v2/ci.yml b/.pipelines/v2/ci.yml index 268bea7d11..5e7bf26676 100644 --- a/.pipelines/v2/ci.yml +++ b/.pipelines/v2/ci.yml @@ -32,7 +32,7 @@ parameters: - name: enableMsBuildCaching type: boolean displayName: "Enable MSBuild Caching" - default: true + default: false - name: runTests type: boolean displayName: "Run Tests" diff --git a/doc/planning/awake.md b/doc/planning/awake.md index 1f42eaca83..ae01e6f85d 100644 --- a/doc/planning/awake.md +++ b/doc/planning/awake.md @@ -10,13 +10,22 @@ The build ID can be found in `Core\Constants.cs` in the `BuildId` variable - it The build ID moniker is made up of two components - a reference to a [Halo](https://en.wikipedia.org/wiki/Halo_(franchise)) character, and the date when the work on the specific build started in the format of `MMDDYYYY`. -| Build ID | Build Date | -|:-------------------------------------------------------------------|:----------------| -| [`VISEGRADRELAY_08152024`](#VISEGRADRELAY_08152024-august-15-2024) | August 15, 2024 | -| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 | -| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 | -| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 | -| `ARBITER_01312022` | January 31, 2022 | +| Build ID | Build Date | +|:-------------------------------------------------------------------|:------------------| +| [`PROMETHEAN_09082024`](#PROMETHEAN_09082024-september-8-2024) | September 8, 2024 | +| [`VISEGRADRELAY_08152024`](#VISEGRADRELAY_08152024-august-15-2024) | August 15, 2024 | +| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 | +| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 | +| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 | +| `ARBITER_01312022` | January 31, 2022 | + +### `PROMETHEAN_09082024` (September 8, 2024) + +>[!NOTE] +>See pull request: [Awake - `PROMETHEAN_09082024`](https://github.com/microsoft/PowerToys/pull/34717) + +- Updating the initialization logic to make sure that settings are respected for proper group policy and single-instance detection. +- [#34148] Fixed a bug from the previous release that incorrectly synchronized threads for shell icon creation and initialized parent PID when it was not parented. ### `VISEGRADRELAY_08152024` (August 15, 2024) diff --git a/src/modules/awake/Awake/Core/Constants.cs b/src/modules/awake/Awake/Core/Constants.cs index db3d20d745..1bd6f0a043 100644 --- a/src/modules/awake/Awake/Core/Constants.cs +++ b/src/modules/awake/Awake/Core/Constants.cs @@ -17,6 +17,6 @@ namespace Awake.Core // Format of the build ID is: CODENAME_MMDDYYYY, where MMDDYYYY // is representative of the date when the last change was made before // the pull request is issued. - internal const string BuildId = "VISEGRADRELAY_08152024"; + internal const string BuildId = "PROMETHEAN_09082024"; } } diff --git a/src/modules/awake/Awake/Core/Models/SingleThreadSynchronizationContext.cs b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs similarity index 61% rename from src/modules/awake/Awake/Core/Models/SingleThreadSynchronizationContext.cs rename to src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs index e2ef3f92c4..4b432320d9 100644 --- a/src/modules/awake/Awake/Core/Models/SingleThreadSynchronizationContext.cs +++ b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs @@ -6,17 +6,16 @@ using System; using System.Collections.Generic; using System.Threading; -namespace Awake.Core.Models +namespace Awake.Core.Threading { internal sealed class SingleThreadSynchronizationContext : SynchronizationContext { - private readonly Queue> queue = - new(); + private readonly Queue?> queue = new(); -#pragma warning disable CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes). - public override void Post(SendOrPostCallback d, object state) -#pragma warning restore CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes). + public override void Post(SendOrPostCallback d, object? state) { + ArgumentNullException.ThrowIfNull(d); + lock (queue) { queue.Enqueue(Tuple.Create(d, state)); @@ -28,7 +27,7 @@ namespace Awake.Core.Models { while (true) { - Tuple work; + Tuple? work; lock (queue) { while (queue.Count == 0) @@ -44,7 +43,14 @@ namespace Awake.Core.Models break; } - work.Item1(work.Item2); + try + { + work.Item1(work.Item2); + } + catch (Exception e) + { + Console.WriteLine("Error during execution: " + e.Message); + } } } @@ -52,9 +58,7 @@ namespace Awake.Core.Models { lock (queue) { -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. queue.Enqueue(null); // Signal the end of the message loop -#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. Monitor.Pulse(queue); } } diff --git a/src/modules/awake/Awake/Core/TrayHelper.cs b/src/modules/awake/Awake/Core/TrayHelper.cs index 26539db1c8..0545f97a8f 100644 --- a/src/modules/awake/Awake/Core/TrayHelper.cs +++ b/src/modules/awake/Awake/Core/TrayHelper.cs @@ -9,10 +9,9 @@ using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Threading; -using System.Threading.Tasks; - using Awake.Core.Models; using Awake.Core.Native; +using Awake.Core.Threading; using Awake.Properties; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; @@ -29,13 +28,13 @@ namespace Awake.Core internal static class TrayHelper { private static NotifyIconData _notifyIconData; - private static IntPtr _trayMenu; + private static IntPtr _hiddenWindowHandle; + private static SingleThreadSynchronizationContext? _syncContext; + private static Thread? _mainThread; private static IntPtr TrayMenu { get => _trayMenu; set => _trayMenu = value; } - private static IntPtr _hiddenWindowHandle; - internal static IntPtr HiddenWindowHandle { get => _hiddenWindowHandle; private set => _hiddenWindowHandle = value; } static TrayHelper() @@ -46,42 +45,35 @@ namespace Awake.Core private static void ShowContextMenu(IntPtr hWnd) { - if (TrayMenu != IntPtr.Zero) + if (TrayMenu == IntPtr.Zero) { - Bridge.SetForegroundWindow(hWnd); - - // Get the handle to the context menu associated with the tray icon - IntPtr hMenu = TrayMenu; - - // Get the current cursor position - Bridge.GetCursorPos(out Models.Point cursorPos); - - Bridge.ScreenToClient(hWnd, ref cursorPos); - - MenuInfo menuInfo = new() - { - CbSize = (uint)Marshal.SizeOf(typeof(MenuInfo)), - FMask = Native.Constants.MIM_STYLE, - DwStyle = Native.Constants.MNS_AUTO_DISMISS, - }; - Bridge.SetMenuInfo(hMenu, ref menuInfo); - - // Display the context menu at the cursor position - Bridge.TrackPopupMenuEx( - hMenu, - Native.Constants.TPM_LEFT_ALIGN | Native.Constants.TPM_BOTTOMALIGN | Native.Constants.TPM_LEFT_BUTTON, - cursorPos.X, - cursorPos.Y, - hWnd, - IntPtr.Zero); - } - else - { - // Tray menu was not initialized. Log the issue. - // This is normal when operating in "standalone mode" - that is, detached - // from the PowerToys configuration file. Logger.LogError("Tried to create a context menu while the TrayMenu object is a null pointer. Normal when used in standalone mode."); + return; } + + Bridge.SetForegroundWindow(hWnd); + + // Get cursor position and convert it to client coordinates + Bridge.GetCursorPos(out Models.Point cursorPos); + Bridge.ScreenToClient(hWnd, ref cursorPos); + + // Set menu information + var menuInfo = new MenuInfo + { + CbSize = (uint)Marshal.SizeOf(), + FMask = Native.Constants.MIM_STYLE, + DwStyle = Native.Constants.MNS_AUTO_DISMISS, + }; + Bridge.SetMenuInfo(TrayMenu, ref menuInfo); + + // Display the context menu at the cursor position + Bridge.TrackPopupMenuEx( + TrayMenu, + Native.Constants.TPM_LEFT_ALIGN | Native.Constants.TPM_BOTTOMALIGN | Native.Constants.TPM_LEFT_BUTTON, + cursorPos.X, + cursorPos.Y, + hWnd, + IntPtr.Zero); } public static void InitializeTray(Icon icon, string text) @@ -89,8 +81,11 @@ namespace Awake.Core IntPtr hWnd = IntPtr.Zero; // Start the message loop asynchronously - Task.Run(() => + _mainThread = new Thread(() => { + _syncContext = new SingleThreadSynchronizationContext(); + SynchronizationContext.SetSynchronizationContext(_syncContext); + RunOnMainThread(() => { WndClassEx wcex = new() @@ -137,74 +132,82 @@ namespace Awake.Core Bridge.ShowWindow(hWnd, 0); // SW_HIDE Bridge.UpdateWindow(hWnd); + Logger.LogInfo($"Created HWND for the window: {hWnd}"); SetShellIcon(hWnd, text, icon); }); - }).Wait(); - Task.Run(() => - { RunOnMainThread(() => { RunMessageLoop(); }); + + _syncContext!.BeginMessageLoop(); }); + + _mainThread.IsBackground = true; + _mainThread.Start(); } internal static void SetShellIcon(IntPtr hWnd, string text, Icon? icon, TrayIconAction action = TrayIconAction.Add) { - Logger.LogInfo($"Setting the shell icon.\nText: {text}\nAction: {action}"); - - int message = Native.Constants.NIM_ADD; - - switch (action) + if (hWnd != IntPtr.Zero && icon != null) { - case TrayIconAction.Update: - message = Native.Constants.NIM_MODIFY; - break; - case TrayIconAction.Delete: - message = Native.Constants.NIM_DELETE; - break; - case TrayIconAction.Add: - default: - break; - } + int message = Native.Constants.NIM_ADD; - if (action == TrayIconAction.Add || action == TrayIconAction.Update) - { - Logger.LogInfo($"Adding or updating tray icon. HIcon handle is {icon?.Handle}\nHWnd: {hWnd}"); - - _notifyIconData = new NotifyIconData + switch (action) { - CbSize = Marshal.SizeOf(typeof(NotifyIconData)), - HWnd = hWnd, - UId = 1000, - UFlags = Native.Constants.NIF_ICON | Native.Constants.NIF_TIP | Native.Constants.NIF_MESSAGE, - UCallbackMessage = (int)Native.Constants.WM_USER, - HIcon = icon?.Handle ?? IntPtr.Zero, - SzTip = text, - }; - } - else if (action == TrayIconAction.Delete) - { - _notifyIconData = new NotifyIconData + case TrayIconAction.Update: + message = Native.Constants.NIM_MODIFY; + break; + case TrayIconAction.Delete: + message = Native.Constants.NIM_DELETE; + break; + case TrayIconAction.Add: + default: + break; + } + + if (action == TrayIconAction.Add || action == TrayIconAction.Update) { - CbSize = Marshal.SizeOf(typeof(NotifyIconData)), - HWnd = hWnd, - UId = 1000, - UFlags = 0, - }; - } + _notifyIconData = new NotifyIconData + { + CbSize = Marshal.SizeOf(typeof(NotifyIconData)), + HWnd = hWnd, + UId = 1000, + UFlags = Native.Constants.NIF_ICON | Native.Constants.NIF_TIP | Native.Constants.NIF_MESSAGE, + UCallbackMessage = (int)Native.Constants.WM_USER, + HIcon = icon?.Handle ?? IntPtr.Zero, + SzTip = text, + }; + } + else if (action == TrayIconAction.Delete) + { + _notifyIconData = new NotifyIconData + { + CbSize = Marshal.SizeOf(typeof(NotifyIconData)), + HWnd = hWnd, + UId = 1000, + UFlags = 0, + }; + } - if (!Bridge.Shell_NotifyIcon(message, ref _notifyIconData)) - { - int errorCode = Marshal.GetLastWin32Error(); - throw new Win32Exception(errorCode, $"Failed to change tray icon. Action: {action} and error code: {errorCode}"); - } + if (!Bridge.Shell_NotifyIcon(message, ref _notifyIconData)) + { + int errorCode = Marshal.GetLastWin32Error(); + Logger.LogInfo($"Could not set the shell icon. Action: {action} and error code: {errorCode}. HIcon handle is {icon?.Handle} and HWnd is {hWnd}"); - if (action == TrayIconAction.Delete) + throw new Win32Exception(errorCode, $"Failed to change tray icon. Action: {action} and error code: {errorCode}"); + } + + if (action == TrayIconAction.Delete) + { + _notifyIconData = default; + } + } + else { - _notifyIconData = default; + Logger.LogInfo($"Cannot set the shell icon - parent window handle is zero or icon is not available. Text: {text} Action: {action}"); } } @@ -215,6 +218,8 @@ namespace Awake.Core Bridge.TranslateMessage(ref msg); Bridge.DispatchMessage(ref msg); } + + Logger.LogInfo("Message loop terminated."); } private static int WndProc(IntPtr hWnd, uint message, IntPtr wParam, IntPtr lParam) @@ -295,30 +300,20 @@ namespace Awake.Core internal static void RunOnMainThread(Action action) { - var syncContext = new SingleThreadSynchronizationContext(); - SynchronizationContext.SetSynchronizationContext(syncContext); - -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - syncContext.Post( - _ => - { - try + _syncContext!.Post( + _ => { - action(); - } - catch (Exception e) - { - Console.WriteLine("Error: " + e.Message); - } - finally - { - syncContext.EndMessageLoop(); - } - }, - null); -#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. - - syncContext.BeginMessageLoop(); + try + { + Logger.LogInfo($"Thread execution is on: {Environment.CurrentManagedThreadId}"); + action(); + } + catch (Exception e) + { + Console.WriteLine("Error: " + e.Message); + } + }, + null); } internal static void SetTray(AwakeSettings settings, bool startedFromPowerToys) @@ -353,6 +348,7 @@ namespace Awake.Core private static void CreateNewTrayMenu(bool startedFromPowerToys, bool keepDisplayOn, AwakeMode mode) { TrayMenu = Bridge.CreatePopupMenu(); + if (TrayMenu == IntPtr.Zero) { return; diff --git a/src/modules/awake/Awake/Program.cs b/src/modules/awake/Awake/Program.cs index 9ecaccd3a7..2dd22db874 100644 --- a/src/modules/awake/Awake/Program.cs +++ b/src/modules/awake/Awake/Program.cs @@ -53,7 +53,6 @@ namespace Awake { _settingsUtils = new SettingsUtils(); LockMutex = new Mutex(true, Core.Constants.AppName, out bool instantiated); - Logger.InitializeLogger(Path.Combine("\\", Core.Constants.AppName, "Logs")); try @@ -71,86 +70,93 @@ namespace Awake AppDomain.CurrentDomain.UnhandledException += AwakeUnhandledExceptionCatcher; - if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredAwakeEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled) - { - Exit("PowerToys.Awake tried to start with a group policy setting that disables the tool. Please contact your system administrator.", 1); - return 0; - } - if (!instantiated) { + // Awake is already running - there is no need for us to process + // anything further Exit(Core.Constants.AppName + " is already running! Exiting the application.", 1); + return 1; } - - Logger.LogInfo($"Launching {Core.Constants.AppName}..."); - Logger.LogInfo(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); - Logger.LogInfo($"Build: {Core.Constants.BuildId}"); - Logger.LogInfo($"OS: {Environment.OSVersion}"); - Logger.LogInfo($"OS Build: {Manager.GetOperatingSystemBuild()}"); - - TaskScheduler.UnobservedTaskException += (sender, args) => + else { - Trace.WriteLine($"Task scheduler error: {args.Exception.Message}"); // somebody forgot to check! - args.SetObserved(); - }; + if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredAwakeEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled) + { + Exit("PowerToys.Awake tried to start with a group policy setting that disables the tool. Please contact your system administrator.", 1); + return 1; + } + else + { + Logger.LogInfo($"Launching {Core.Constants.AppName}..."); + Logger.LogInfo(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); + Logger.LogInfo($"Build: {Core.Constants.BuildId}"); + Logger.LogInfo($"OS: {Environment.OSVersion}"); + Logger.LogInfo($"OS Build: {Manager.GetOperatingSystemBuild()}"); - // To make it easier to diagnose future issues, let's get the - // system power capabilities and aggregate them in the log. - Bridge.GetPwrCapabilities(out _powerCapabilities); - Logger.LogInfo(JsonSerializer.Serialize(_powerCapabilities)); + TaskScheduler.UnobservedTaskException += (sender, args) => + { + Trace.WriteLine($"Task scheduler error: {args.Exception.Message}"); // somebody forgot to check! + args.SetObserved(); + }; - Logger.LogInfo("Parsing parameters..."); + // To make it easier to diagnose future issues, let's get the + // system power capabilities and aggregate them in the log. + Bridge.GetPwrCapabilities(out _powerCapabilities); + Logger.LogInfo(JsonSerializer.Serialize(_powerCapabilities)); - var configOption = new Option(AliasesConfigOption, () => false, Resources.AWAKE_CMD_HELP_CONFIG_OPTION) - { - Arity = ArgumentArity.ZeroOrOne, - IsRequired = false, - }; + Logger.LogInfo("Parsing parameters..."); - var displayOption = new Option(AliasesDisplayOption, () => true, Resources.AWAKE_CMD_HELP_DISPLAY_OPTION) - { - Arity = ArgumentArity.ZeroOrOne, - IsRequired = false, - }; + var configOption = new Option(AliasesConfigOption, () => false, Resources.AWAKE_CMD_HELP_CONFIG_OPTION) + { + Arity = ArgumentArity.ZeroOrOne, + IsRequired = false, + }; - var timeOption = new Option(AliasesTimeOption, () => 0, Resources.AWAKE_CMD_HELP_TIME_OPTION) - { - Arity = ArgumentArity.ExactlyOne, - IsRequired = false, - }; + var displayOption = new Option(AliasesDisplayOption, () => true, Resources.AWAKE_CMD_HELP_DISPLAY_OPTION) + { + Arity = ArgumentArity.ZeroOrOne, + IsRequired = false, + }; - var pidOption = new Option(AliasesPidOption, () => 0, Resources.AWAKE_CMD_HELP_PID_OPTION) - { - Arity = ArgumentArity.ZeroOrOne, - IsRequired = false, - }; + var timeOption = new Option(AliasesTimeOption, () => 0, Resources.AWAKE_CMD_HELP_TIME_OPTION) + { + Arity = ArgumentArity.ExactlyOne, + IsRequired = false, + }; - var expireAtOption = new Option(AliasesExpireAtOption, () => string.Empty, Resources.AWAKE_CMD_HELP_EXPIRE_AT_OPTION) - { - Arity = ArgumentArity.ZeroOrOne, - IsRequired = false, - }; + var pidOption = new Option(AliasesPidOption, () => 0, Resources.AWAKE_CMD_HELP_PID_OPTION) + { + Arity = ArgumentArity.ZeroOrOne, + IsRequired = false, + }; - var parentPidOption = new Option(AliasesParentPidOption, () => true, Resources.AWAKE_CMD_PARENT_PID_OPTION) - { - Arity = ArgumentArity.ZeroOrOne, - IsRequired = false, - }; + var expireAtOption = new Option(AliasesExpireAtOption, () => string.Empty, Resources.AWAKE_CMD_HELP_EXPIRE_AT_OPTION) + { + Arity = ArgumentArity.ZeroOrOne, + IsRequired = false, + }; - RootCommand? rootCommand = - [ - configOption, - displayOption, - timeOption, - pidOption, - expireAtOption, - parentPidOption, - ]; + var parentPidOption = new Option(AliasesParentPidOption, () => false, Resources.AWAKE_CMD_PARENT_PID_OPTION) + { + Arity = ArgumentArity.ZeroOrOne, + IsRequired = false, + }; - rootCommand.Description = Core.Constants.AppName; - rootCommand.SetHandler(HandleCommandLineArguments, configOption, displayOption, timeOption, pidOption, expireAtOption, parentPidOption); + RootCommand? rootCommand = + [ + configOption, + displayOption, + timeOption, + pidOption, + expireAtOption, + parentPidOption, + ]; - return rootCommand.InvokeAsync(args).Result; + rootCommand.Description = Core.Constants.AppName; + rootCommand.SetHandler(HandleCommandLineArguments, configOption, displayOption, timeOption, pidOption, expireAtOption, parentPidOption); + + return rootCommand.InvokeAsync(args).Result; + } + } } private static void AwakeUnhandledExceptionCatcher(object sender, UnhandledExceptionEventArgs e) @@ -180,15 +186,11 @@ namespace Awake if (pid == 0 && !useParentPid) { Logger.LogInfo("No PID specified. Allocating console..."); - Manager.AllocateConsole(); - - _handler += new ConsoleEventHandler(ExitHandler); - Manager.SetConsoleControlHandler(_handler, true); - - Trace.Listeners.Add(new ConsoleTraceListener()); + AllocateLocalConsole(); } else { + Logger.LogInfo("Starting with PID binding."); _startedFromPowerToys = true; } @@ -246,7 +248,7 @@ namespace Awake } catch (Exception ex) { - Logger.LogError($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"); + Logger.LogError($"There was a problem with the configuration file. Make sure it exists. {ex.Message}"); } } else if (pid != 0 || useParentPid) @@ -307,38 +309,22 @@ namespace Awake } } + private static void AllocateLocalConsole() + { + Manager.AllocateConsole(); + + _handler += new ConsoleEventHandler(ExitHandler); + Manager.SetConsoleControlHandler(_handler, true); + + Trace.Listeners.Add(new ConsoleTraceListener()); + } + private static void ScaffoldConfiguration(string settingsPath) { try { - var directory = Path.GetDirectoryName(settingsPath)!; - var fileName = Path.GetFileName(settingsPath); - - _watcher = new FileSystemWatcher - { - Path = directory, - EnableRaisingEvents = true, - NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.CreationTime, - Filter = fileName, - }; - - var mergedObservable = Observable.Merge( - Observable.FromEventPattern( - h => _watcher.Changed += h, - h => _watcher.Changed -= h), - Observable.FromEventPattern( - h => _watcher.Created += h, - h => _watcher.Created -= h)); - - mergedObservable - .Throttle(TimeSpan.FromMilliseconds(25)) - .SubscribeOn(TaskPoolScheduler.Default) - .Select(e => e.EventArgs) - .Subscribe(HandleAwakeConfigChange); - - var settings = Manager.ModuleSettings!.GetSettings(Core.Constants.AppName) ?? new AwakeSettings(); - TrayHelper.SetTray(settings, _startedFromPowerToys); - + SetupFileSystemWatcher(settingsPath); + InitializeSettings(); ProcessSettings(); } catch (Exception ex) @@ -347,6 +333,38 @@ namespace Awake } } + private static void SetupFileSystemWatcher(string settingsPath) + { + var directory = Path.GetDirectoryName(settingsPath)!; + var fileName = Path.GetFileName(settingsPath); + + _watcher = new FileSystemWatcher + { + Path = directory, + EnableRaisingEvents = true, + NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.CreationTime, + Filter = fileName, + }; + + Observable.Merge( + Observable.FromEventPattern( + h => _watcher.Changed += h, + h => _watcher.Changed -= h), + Observable.FromEventPattern( + h => _watcher.Created += h, + h => _watcher.Created -= h)) + .Throttle(TimeSpan.FromMilliseconds(25)) + .SubscribeOn(TaskPoolScheduler.Default) + .Select(e => e.EventArgs) + .Subscribe(HandleAwakeConfigChange); + } + + private static void InitializeSettings() + { + var settings = Manager.ModuleSettings?.GetSettings(Core.Constants.AppName) ?? new AwakeSettings(); + TrayHelper.SetTray(settings, _startedFromPowerToys); + } + private static void HandleAwakeConfigChange(FileSystemEventArgs fileEvent) { try @@ -364,7 +382,9 @@ namespace Awake { try { - var settings = _settingsUtils!.GetSettings(Core.Constants.AppName) ?? throw new InvalidOperationException("Settings are null."); + var settings = _settingsUtils!.GetSettings(Core.Constants.AppName) + ?? throw new InvalidOperationException("Settings are null."); + Logger.LogInfo($"Identified custom time shortcuts for the tray: {settings.Properties.CustomTrayTimes.Count}"); switch (settings.Properties.Mode) @@ -378,7 +398,7 @@ namespace Awake break; case AwakeMode.TIMED: - uint computedTime = (settings.Properties.IntervalHours * 60 * 60) + (settings.Properties.IntervalMinutes * 60); + uint computedTime = (settings.Properties.IntervalHours * 3600) + (settings.Properties.IntervalMinutes * 60); Manager.SetTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn); break; From dca8b7ac3560a77a57202398dd7e1e68e6eb9006 Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:54:16 +0200 Subject: [PATCH 03/54] [Workspaces] implement standalone app handling (#34948) --- .github/actions/spell-check/expect.txt | 4 + .../WorkspacesSnapshotTool/SnapshotUtils.cpp | 85 +++++++++++++++++-- .../WindowArranger.cpp | 6 +- 3 files changed, 84 insertions(+), 11 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 131d5fb850..1fca6be137 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -367,6 +367,7 @@ dllmain DNLEN DONOTROUND DONTVALIDATEPATH +DOPUS dotnet DPICHANGED DPIs @@ -1265,6 +1266,7 @@ PWSTR pwsz pwtd QDC +QDir qianlifeng qit QITAB @@ -1642,6 +1644,7 @@ toolkitconverters Toolset toolwindow TOPDOWNDIB +TOTALCMD TOUCHEVENTF TOUCHINPUT touchpad @@ -1908,6 +1911,7 @@ XLoc XNamespace XPels XPixel +xplorer XResource xsi XStr diff --git a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp index 54f603dbc8..66aebb751b 100644 --- a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp +++ b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp @@ -19,6 +19,15 @@ namespace SnapshotUtils namespace NonLocalizable { const std::wstring ApplicationFrameHost = L"ApplicationFrameHost.exe"; + + namespace FileManagers + { + const std::wstring FileExplorer = L"EXPLORER"; // windows explorer + const std::wstring TotalCommander = L"TOTALCMD"; // total commander + const std::wstring DirectoryOpus = L"DOPUS"; // directory opus + const std::wstring QDir = L"Q-DIR"; // Q-Dir + const std::wstring Xplorer2 = L"XPLORER2"; // Xplorer2 + } } class WbemHelper @@ -191,6 +200,17 @@ namespace SnapshotUtils return res; } + bool IsFileManagerApp(std::wstring processPath) + { + std::wstring appName = std::filesystem::path(processPath).stem(); + std::transform(appName.begin(), appName.end(), appName.begin(), towupper); + return ((appName == NonLocalizable::FileManagers::FileExplorer) // windows explorer + || (appName.starts_with(NonLocalizable::FileManagers::TotalCommander)) // total commander + || (appName == NonLocalizable::FileManagers::DirectoryOpus) // directory opus + || (appName == NonLocalizable::FileManagers::QDir) // Q-Dir + || (appName.starts_with(NonLocalizable::FileManagers::Xplorer2))); // Xplorer2 + } + std::vector GetApps(const std::function getMonitorNumberFromWindowHandle) { std::vector apps{}; @@ -269,25 +289,72 @@ namespace SnapshotUtils if (!data.has_value() || data->name.empty()) { Logger::info(L"Installed app not found: {}, try parent process", processPath); - + + bool standaloneApp = false; + bool steamLikeApp = false; + // try with parent process (fix for Steam) auto parentPid = GetParentPid(pid); auto parentProcessPath = get_process_path(parentPid); - if (!parentProcessPath.empty()) + + // check if original process is in the subfolder of the parent process which is a sign of an steam-like app + std::wstring processDir = std::filesystem::path(processPath).parent_path().c_str(); + std::wstring parentProcessDir = std::filesystem::path(parentProcessPath).parent_path().c_str(); + + if (parentProcessPath == L"") { - data = Utils::Apps::GetApp(parentProcessPath, installedApps); - if (!data.has_value() || data->name.empty()) + if (processPath.ends_with(NonLocalizable::ApplicationFrameHost)) { - Logger::info(L"Installed parent app not found: {}", processPath); + // filter out ApplicationFrameHost.exe continue; } - - processPath = parentProcessPath; + else + { + Logger::info(L"parent process unknown, the parent app is an already closed file manager app, it is a standalone app"); + standaloneApp = true; + } + } + else if (processDir.starts_with(parentProcessDir)) + { + Logger::info(L"parent process: {}, original process is in the subfolder of the parent process, it is a steam-like app", parentProcessPath); + steamLikeApp = true; + } + else if (IsFileManagerApp(parentProcessPath)) + { + Logger::info(L"parent process: {}, The parent process is a known file manager app, it is a standalone app", parentProcessPath); + standaloneApp = true; } else { - Logger::info(L"Parent process path not found"); - continue; + Logger::info(L"parent process: {}, The parent process is NOT a known file manager app, it is a steam-like app", parentProcessPath); + steamLikeApp = true; + } + + if (standaloneApp) + { + data = Utils::Apps::AppData{ + .name = std::filesystem::path(processPath).stem(), + .installPath = processPath, + }; + } + else if (steamLikeApp) + { + if (!parentProcessPath.empty()) + { + data = Utils::Apps::GetApp(parentProcessPath, installedApps); + if (!data.has_value() || data->name.empty()) + { + Logger::info(L"Installed parent app not found: {}", processPath); + continue; + } + + processPath = parentProcessPath; + } + else + { + Logger::info(L"Parent process path not found"); + continue; + } } } diff --git a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp index ba56dc1843..96b68a9c91 100644 --- a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp +++ b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp @@ -174,13 +174,15 @@ void WindowArranger::processWindow(HWND window) } auto data = Utils::Apps::GetApp(processPath, m_installedApps); - if (!data.has_value() || data->name.empty()) + if (!data.has_value()) { return; } auto iter = std::find_if(m_launchingApps.begin(), m_launchingApps.end(), [&](const auto& val) - { return val.second.state == LaunchingState::Waiting && val.first.name == data.value().name; }); + { + return val.second.state == LaunchingState::Waiting && !val.second.window && (val.first.name == data.value().name || val.first.path == data.value().installPath); + }); if (iter == m_launchingApps.end()) { Logger::info(L"A window of {} is not in the project", processPath); From e79b0163b7c8c5d553e5c4bf06cf068d20e03f6e Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 27 Sep 2024 04:26:47 -0500 Subject: [PATCH 04/54] [ci]Disable recompilation for the NuGet packages (#35085) -t:Pack is insufficient for packing a NuGet package after you've signed the DLLs. Without -p:NoBuild=true, sometimes it will rebuild (or re-link) them for you. --- .pipelines/v2/templates/job-build-project.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index 88417ca983..d24158658b 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -224,7 +224,7 @@ jobs: inputs: solution: '**\HostsUILib.csproj' vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true -t:pack /bl:$(LogOutputDirectory)\build-hosts.binlog + msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-hosts.binlog configuration: $(BuildConfiguration) msbuildArchitecture: x64 maximumCpuCount: true @@ -237,7 +237,7 @@ jobs: inputs: solution: '**\EnvironmentVariablesUILib.csproj' vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true -t:pack /bl:$(LogOutputDirectory)\build-env-var-editor.binlog + msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-env-var-editor.binlog configuration: $(BuildConfiguration) msbuildArchitecture: x64 maximumCpuCount: true @@ -250,7 +250,7 @@ jobs: inputs: solution: '**\RegistryPreviewUILib.csproj' vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true -t:pack /bl:$(LogOutputDirectory)\build-registry-preview.binlog + msbuildArgs: /p:CIBuild=true;NoBuild=true -t:pack /bl:$(LogOutputDirectory)\build-registry-preview.binlog configuration: $(BuildConfiguration) msbuildArchitecture: x64 maximumCpuCount: true From 474c6f732212eb5168d1dc2c92b70c8e616a3221 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 27 Sep 2024 04:39:42 -0500 Subject: [PATCH 05/54] [Build]reintroduce variables.EnablePipelineCache (#35087) * build: reintroduce variables.EnablePipelineCache --- .pipelines/v2/ci.yml | 2 +- .pipelines/v2/templates/pipeline-ci-build.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pipelines/v2/ci.yml b/.pipelines/v2/ci.yml index 5e7bf26676..268bea7d11 100644 --- a/.pipelines/v2/ci.yml +++ b/.pipelines/v2/ci.yml @@ -32,7 +32,7 @@ parameters: - name: enableMsBuildCaching type: boolean displayName: "Enable MSBuild Caching" - default: false + default: true - name: runTests type: boolean displayName: "Run Tests" diff --git a/.pipelines/v2/templates/pipeline-ci-build.yml b/.pipelines/v2/templates/pipeline-ci-build.yml index 73a3ff766d..17f4654ccd 100644 --- a/.pipelines/v2/templates/pipeline-ci-build.yml +++ b/.pipelines/v2/templates/pipeline-ci-build.yml @@ -3,6 +3,9 @@ variables: value: false - name: EnablePipelineCache value: true + - ${{ if eq(parameters.enableMsBuildCaching, true) }}: + - name: EnablePipelineCache + value: true parameters: - name: buildPlatforms From ff17e3dec911d560eb964ef95f81c00b941e7e6a Mon Sep 17 00:00:00 2001 From: Den Delimarsky Date: Fri, 27 Sep 2024 12:38:42 -0700 Subject: [PATCH 06/54] [Awake]Log error with Logger instead of console (#35100) --- .pipelines/v2/ci.yml | 2 +- src/modules/awake/Awake/Core/Manager.cs | 1 - .../Core/Threading/SingleThreadSynchronizationContext.cs | 6 ++++-- src/modules/awake/Awake/Program.cs | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pipelines/v2/ci.yml b/.pipelines/v2/ci.yml index 268bea7d11..5e7bf26676 100644 --- a/.pipelines/v2/ci.yml +++ b/.pipelines/v2/ci.yml @@ -32,7 +32,7 @@ parameters: - name: enableMsBuildCaching type: boolean displayName: "Enable MSBuild Caching" - default: true + default: false - name: runTests type: boolean displayName: "Run Tests" diff --git a/src/modules/awake/Awake/Core/Manager.cs b/src/modules/awake/Awake/Core/Manager.cs index ba69f9c8df..f237250635 100644 --- a/src/modules/awake/Awake/Core/Manager.cs +++ b/src/modules/awake/Awake/Core/Manager.cs @@ -14,7 +14,6 @@ using System.Runtime.InteropServices; using System.Text; using System.Text.Json; using System.Threading; - using Awake.Core.Models; using Awake.Core.Native; using Awake.Properties; diff --git a/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs index 4b432320d9..04c28dfd34 100644 --- a/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs +++ b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Threading; +using ManagedCommon; namespace Awake.Core.Threading { @@ -49,7 +50,7 @@ namespace Awake.Core.Threading } catch (Exception e) { - Console.WriteLine("Error during execution: " + e.Message); + Logger.LogError("Error during execution of the STS context message loop: " + e.Message); } } } @@ -58,7 +59,8 @@ namespace Awake.Core.Threading { lock (queue) { - queue.Enqueue(null); // Signal the end of the message loop + // Signal the end of the message loop + queue.Enqueue(null); Monitor.Pulse(queue); } } diff --git a/src/modules/awake/Awake/Program.cs b/src/modules/awake/Awake/Program.cs index 2dd22db874..d1311ef51f 100644 --- a/src/modules/awake/Awake/Program.cs +++ b/src/modules/awake/Awake/Program.cs @@ -15,7 +15,6 @@ using System.Reflection; using System.Text.Json; using System.Threading; using System.Threading.Tasks; - using Awake.Core; using Awake.Core.Models; using Awake.Core.Native; From 6bab73777b5e2d6988c816a80a32cf270bdaf703 Mon Sep 17 00:00:00 2001 From: Seraphima Zykova Date: Sat, 28 Sep 2024 01:00:53 +0300 Subject: [PATCH 07/54] [Workspaces]Fix Steam repositioning (#35101) * moved and simplified logic * address PR comment --- .../Workspaces/WorkspacesLib/AppUtils.cpp | 75 ++++++++++- .../Workspaces/WorkspacesLib/AppUtils.h | 2 +- .../WorkspacesSnapshotTool/SnapshotUtils.cpp | 117 +----------------- .../WindowArranger.cpp | 12 +- 4 files changed, 80 insertions(+), 126 deletions(-) diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp index 18067427dd..7c9bfe332d 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp @@ -2,8 +2,9 @@ #include "AppUtils.h" #include -#include #include +#include +#include #include @@ -28,6 +29,7 @@ namespace Utils constexpr const wchar_t* PowerToys = L"PowerToys.exe"; constexpr const wchar_t* PowerToysSettingsUpper = L"POWERTOYS.SETTINGS.EXE"; constexpr const wchar_t* PowerToysSettings = L"PowerToys.Settings.exe"; + constexpr const wchar_t* ApplicationFrameHost = L"APPLICATIONFRAMEHOST.EXE"; } AppList IterateAppsFolder() @@ -184,11 +186,39 @@ namespace Utils return IterateAppsFolder(); } - std::optional GetApp(const std::wstring& appPath, const AppList& apps) + DWORD GetParentPid(DWORD pid) + { + DWORD res = 0; + HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + PROCESSENTRY32 pe = { 0 }; + pe.dwSize = sizeof(PROCESSENTRY32); + + if (Process32First(h, &pe)) + { + do + { + if (pe.th32ProcessID == pid) + { + res = pe.th32ParentProcessID; + } + } while (Process32Next(h, &pe)); + } + + CloseHandle(h); + return res; + } + + std::optional GetApp(const std::wstring& appPath, DWORD pid, const AppList& apps) { std::wstring appPathUpper(appPath); std::transform(appPathUpper.begin(), appPathUpper.end(), appPathUpper.begin(), towupper); + // filter out ApplicationFrameHost.exe + if (appPathUpper.ends_with(NonLocalizable::ApplicationFrameHost)) + { + return std::nullopt; + } + // edge case, "Windows Software Development Kit" has the same app path as "File Explorer" if (appPathUpper == NonLocalizable::FileExplorerPath) { @@ -217,6 +247,7 @@ namespace Utils } } + // search in apps list for (const auto& appData : apps) { if (!appData.installPath.empty()) @@ -251,11 +282,43 @@ namespace Utils if (appNameUpper == exeNameUpper) { - return appData; + auto result = appData; + result.installPath = appPath; + return result; } } + // try with parent process (fix for Steam) + auto parentPid = GetParentPid(pid); + auto parentProcessPath = get_process_path(parentPid); + + if (!parentProcessPath.empty()) + { + std::wstring parentDirUpper = std::filesystem::path(parentProcessPath).parent_path().c_str(); + std::transform(parentDirUpper.begin(), parentDirUpper.end(), parentDirUpper.begin(), towupper); + + if (appPathUpper.starts_with(parentDirUpper)) + { + Logger::info(L"original process is in the subfolder of the parent process"); + + for (const auto& appData : apps) + { + if (!appData.installPath.empty()) + { + std::wstring installDirUpper = std::filesystem::path(appData.installPath).parent_path().c_str(); + std::transform(installDirUpper.begin(), installDirUpper.end(), installDirUpper.begin(), towupper); + + if (installDirUpper == parentDirUpper) + { + return appData; + } + } + } + } + } + return AppData{ + .name = std::filesystem::path(appPath).stem(), .installPath = appPath }; } @@ -263,7 +326,11 @@ namespace Utils std::optional GetApp(HWND window, const AppList& apps) { std::wstring processPath = get_process_path(window); - return Utils::Apps::GetApp(processPath, apps); + + DWORD pid{}; + GetWindowThreadProcessId(window, &pid); + + return Utils::Apps::GetApp(processPath, pid, apps); } } } \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.h b/src/modules/Workspaces/WorkspacesLib/AppUtils.h index 4d01f9d4b9..596d7d0a85 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.h +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.h @@ -19,7 +19,7 @@ namespace Utils const std::wstring& GetCurrentFolderUpper(); AppList GetAppsList(); - std::optional GetApp(const std::wstring& appPath, const AppList& apps); + std::optional GetApp(const std::wstring& appPath, DWORD pid, const AppList& apps); std::optional GetApp(HWND window, const AppList& apps); } } \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp index 66aebb751b..4642a5952e 100644 --- a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp +++ b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp @@ -12,22 +12,12 @@ #include #include -#include namespace SnapshotUtils { namespace NonLocalizable { const std::wstring ApplicationFrameHost = L"ApplicationFrameHost.exe"; - - namespace FileManagers - { - const std::wstring FileExplorer = L"EXPLORER"; // windows explorer - const std::wstring TotalCommander = L"TOTALCMD"; // total commander - const std::wstring DirectoryOpus = L"DOPUS"; // directory opus - const std::wstring QDir = L"Q-DIR"; // Q-Dir - const std::wstring Xplorer2 = L"XPLORER2"; // Xplorer2 - } } class WbemHelper @@ -178,39 +168,6 @@ namespace SnapshotUtils return false; } - DWORD GetParentPid(DWORD pid) - { - DWORD res = 0; - HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - PROCESSENTRY32 pe = { 0 }; - pe.dwSize = sizeof(PROCESSENTRY32); - - if (Process32First(h, &pe)) - { - do - { - if (pe.th32ProcessID == pid) - { - res = pe.th32ParentProcessID; - } - } while (Process32Next(h, &pe)); - } - - CloseHandle(h); - return res; - } - - bool IsFileManagerApp(std::wstring processPath) - { - std::wstring appName = std::filesystem::path(processPath).stem(); - std::transform(appName.begin(), appName.end(), appName.begin(), towupper); - return ((appName == NonLocalizable::FileManagers::FileExplorer) // windows explorer - || (appName.starts_with(NonLocalizable::FileManagers::TotalCommander)) // total commander - || (appName == NonLocalizable::FileManagers::DirectoryOpus) // directory opus - || (appName == NonLocalizable::FileManagers::QDir) // Q-Dir - || (appName.starts_with(NonLocalizable::FileManagers::Xplorer2))); // Xplorer2 - } - std::vector GetApps(const std::function getMonitorNumberFromWindowHandle) { std::vector apps{}; @@ -285,83 +242,17 @@ namespace SnapshotUtils continue; } - auto data = Utils::Apps::GetApp(processPath, installedApps); + auto data = Utils::Apps::GetApp(processPath, pid, installedApps); if (!data.has_value() || data->name.empty()) { - Logger::info(L"Installed app not found: {}, try parent process", processPath); - - bool standaloneApp = false; - bool steamLikeApp = false; - - // try with parent process (fix for Steam) - auto parentPid = GetParentPid(pid); - auto parentProcessPath = get_process_path(parentPid); - - // check if original process is in the subfolder of the parent process which is a sign of an steam-like app - std::wstring processDir = std::filesystem::path(processPath).parent_path().c_str(); - std::wstring parentProcessDir = std::filesystem::path(parentProcessPath).parent_path().c_str(); - - if (parentProcessPath == L"") - { - if (processPath.ends_with(NonLocalizable::ApplicationFrameHost)) - { - // filter out ApplicationFrameHost.exe - continue; - } - else - { - Logger::info(L"parent process unknown, the parent app is an already closed file manager app, it is a standalone app"); - standaloneApp = true; - } - } - else if (processDir.starts_with(parentProcessDir)) - { - Logger::info(L"parent process: {}, original process is in the subfolder of the parent process, it is a steam-like app", parentProcessPath); - steamLikeApp = true; - } - else if (IsFileManagerApp(parentProcessPath)) - { - Logger::info(L"parent process: {}, The parent process is a known file manager app, it is a standalone app", parentProcessPath); - standaloneApp = true; - } - else - { - Logger::info(L"parent process: {}, The parent process is NOT a known file manager app, it is a steam-like app", parentProcessPath); - steamLikeApp = true; - } - - if (standaloneApp) - { - data = Utils::Apps::AppData{ - .name = std::filesystem::path(processPath).stem(), - .installPath = processPath, - }; - } - else if (steamLikeApp) - { - if (!parentProcessPath.empty()) - { - data = Utils::Apps::GetApp(parentProcessPath, installedApps); - if (!data.has_value() || data->name.empty()) - { - Logger::info(L"Installed parent app not found: {}", processPath); - continue; - } - - processPath = parentProcessPath; - } - else - { - Logger::info(L"Parent process path not found"); - continue; - } - } + Logger::info(L"Installed app not found: {}", processPath); + continue; } WorkspacesData::WorkspacesProject::Application app{ .name = data.value().name, .title = title, - .path = processPath, + .path = data.value().installPath, .packageFullName = data.value().packageFullName, .appUserModelId = data.value().appUserModelId, .commandLineArgs = L"", // GetCommandLineArgs(pid, wbemHelper), diff --git a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp index 96b68a9c91..18bd2a049f 100644 --- a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp +++ b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp @@ -161,19 +161,16 @@ void WindowArranger::processWindow(HWND window) return; } - std::wstring title = WindowUtils::GetWindowTitle(window); - if (title.empty()) - { - return; - } - std::wstring processPath = get_process_path(window); if (processPath.empty()) { return; } - auto data = Utils::Apps::GetApp(processPath, m_installedApps); + DWORD pid{}; + GetWindowThreadProcessId(window, &pid); + + auto data = Utils::Apps::GetApp(processPath, pid, m_installedApps); if (!data.has_value()) { return; @@ -189,7 +186,6 @@ void WindowArranger::processWindow(HWND window) return; } - Logger::debug(L"Move {}", title); iter->second.window = window; if (moveWindow(window, iter->first)) { From d527d9576d1564fecf294d58a87c7e16eec319db Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:37:21 +0200 Subject: [PATCH 08/54] [Workspaces]Fix snapshot tool: update capturing windows settings app (#35140) * [Workspaces] fix snapshot tool: update capturing windows settings app * spell checker * spell checker * minor change in app utils, when the system settings app is captured --- .github/actions/spell-check/expect.txt | 2 +- src/modules/Workspaces/WorkspacesLib/AppUtils.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 1fca6be137..47662c3766 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1590,7 +1590,7 @@ SYSKEYUP SYSLIB SYSMENU SYSTEMAPPS -systemsettings +SYSTEMSETTINGS SYSTEMTIME SYSTEMWOW tapp diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp index 7c9bfe332d..389e54eae5 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp @@ -26,6 +26,7 @@ namespace Utils constexpr const wchar_t* FileExplorerName = L"File Explorer"; constexpr const wchar_t* FileExplorerPath = L"C:\\WINDOWS\\EXPLORER.EXE"; + constexpr const wchar_t* SystemSettingsPath = L"SYSTEMSETTINGS.EXE"; constexpr const wchar_t* PowerToys = L"PowerToys.exe"; constexpr const wchar_t* PowerToysSettingsUpper = L"POWERTOYS.SETTINGS.EXE"; constexpr const wchar_t* PowerToysSettings = L"PowerToys.Settings.exe"; @@ -257,6 +258,14 @@ namespace Utils if (appPathUpper.contains(installPathUpper)) { + // check if the found app is the System Settings. If yes, update the install path to the exe path + if (appPathUpper.ends_with(NonLocalizable::SystemSettingsPath)) + { + auto settingsAppData = appData; + settingsAppData.installPath = appPath; + return settingsAppData; + } + return appData; } From 9b41786c57adde72f5f107a0d6c9bc5f7cacfc81 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:00:50 +0200 Subject: [PATCH 09/54] [Deps]Revert CommunityToolkit update to fix ARM settings app crash (#35139) --- Directory.Packages.props | 16 ++++++++-------- NOTICE.md | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9ec1d03bd9..0967532dc3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/NOTICE.md b/NOTICE.md index ca957e45ec..d4328bbfc4 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.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.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.UI.Controls.DataGrid 7.1.2 - CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2 - ControlzEx 6.0.0 From 77de44fdb4d73c53d9eb6897759fdf4d841072f8 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Mon, 30 Sep 2024 16:54:07 +0100 Subject: [PATCH 10/54] [NewPlus]Normalize settings infrastructure (#35145) --- .../powertoys_module.cpp | 21 +++++-- .../NewShellExtensionContextMenu/settings.cpp | 62 ++++++++----------- .../Settings.UI.Library/NewPlusProperties.cs | 34 ++++++++++ .../Settings.UI.Library/NewPlusSettings.cs | 29 ++++----- .../ViewModels/DashboardViewModel.cs | 2 +- .../ViewModels/NewPlusViewModel.cs | 27 +++----- 6 files changed, 94 insertions(+), 81 deletions(-) create mode 100644 src/settings-ui/Settings.UI.Library/NewPlusProperties.cs diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp index 2962f236fc..2e6dccfdee 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp @@ -51,21 +51,30 @@ public: return true; } - virtual void set_config(PCWSTR config) override + virtual void set_config(const wchar_t* config) override { // The following just checks to see if the Template Location was changed for metrics purposes // Note: We are not saving the settings here and instead relying on read/write of json in Settings App .cs code paths try { - json::JsonObject config_as_json = json::JsonValue::Parse(winrt::to_hstring(config)).GetObjectW(); + // Parse the input JSON string. + PowerToysSettings::PowerToyValues values = + PowerToysSettings::PowerToyValues::from_json_string(config, get_key()); - const auto latest_location_value = config_as_json.GetNamedString(newplus::constants::non_localizable::settings_json_key_template_location).data(); - const auto existing_location_value = NewSettingsInstance().GetTemplateLocation(); + values.save_to_settings_file(); + NewSettingsInstance().Load(); - if (!newplus::utilities::wstring_same_when_comparing_ignore_case(latest_location_value, existing_location_value)) + auto templateValue = values.get_string_value(newplus::constants::non_localizable::settings_json_key_template_location); + if (templateValue.has_value()) { - Trace::EventChangedTemplateLocation(); + const auto latest_location_value = templateValue.value(); + const auto existing_location_value = NewSettingsInstance().GetTemplateLocation(); + if (!newplus::utilities::wstring_same_when_comparing_ignore_case(latest_location_value, existing_location_value)) + { + Trace::EventChangedTemplateLocation(); + } } + } catch (std::exception& e) { diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/settings.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/settings.cpp index f1322caf1f..7dd5042c4d 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/settings.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/settings.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "settings.h" #include "constants.h" @@ -38,18 +39,13 @@ NewSettings::NewSettings() void NewSettings::Save() { - json::JsonObject new_settings_json_data; + PowerToysSettings::PowerToyValues values(newplus::constants::non_localizable::powertoy_key, newplus::constants::non_localizable::powertoy_key); - new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_hide_file_extension, - json::value(new_settings.hide_file_extension)); + values.add_property(newplus::constants::non_localizable::settings_json_key_hide_file_extension, new_settings.hide_file_extension); + values.add_property(newplus::constants::non_localizable::settings_json_key_hide_starting_digits, new_settings.hide_starting_digits); + values.add_property(newplus::constants::non_localizable::settings_json_key_template_location, new_settings.template_location); - new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_hide_starting_digits, - json::value(new_settings.hide_starting_digits)); - - new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_template_location, - json::value(new_settings.template_location)); - - json::to_file(new_settings_json_file_path, new_settings_json_data); + values.save_to_settings_file(); GetSystemTimeAsFileTime(&new_settings_last_loaded_timestamp); } @@ -122,35 +118,27 @@ void NewSettings::Reload() void NewSettings::ParseJson() { - auto json = json::from_file(new_settings_json_file_path); - if (json) + PowerToysSettings::PowerToyValues settings = + PowerToysSettings::PowerToyValues::load_from_settings_file(newplus::constants::non_localizable::powertoy_key); + + auto templateValue = settings.get_string_value(newplus::constants::non_localizable::settings_json_key_template_location); + if (templateValue.has_value()) { - try - { - const json::JsonObject& new_settings_json = json.value(); - - if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_hide_file_extension, json::JsonValueType::Boolean)) - { - new_settings.hide_file_extension = new_settings_json.GetNamedBoolean( - newplus::constants::non_localizable::settings_json_key_hide_file_extension); - } - - if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_hide_starting_digits, json::JsonValueType::Boolean)) - { - new_settings.hide_starting_digits = new_settings_json.GetNamedBoolean( - newplus::constants::non_localizable::settings_json_key_hide_starting_digits); - } - - if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_template_location, json::JsonValueType::String)) - { - new_settings.template_location = new_settings_json.GetNamedString( - newplus::constants::non_localizable::settings_json_key_template_location); - } - } - catch (const winrt::hresult_error&) - { - } + new_settings.template_location = templateValue.value(); } + + auto hideFileExtensionValue = settings.get_bool_value(newplus::constants::non_localizable::settings_json_key_hide_file_extension); + if (hideFileExtensionValue.has_value()) + { + new_settings.hide_file_extension = hideFileExtensionValue.value(); + } + + auto hideStartingDigitsValue = settings.get_bool_value(newplus::constants::non_localizable::settings_json_key_hide_starting_digits); + if (hideStartingDigitsValue.has_value()) + { + new_settings.hide_starting_digits = hideStartingDigitsValue.value(); + } + GetSystemTimeAsFileTime(&new_settings_last_loaded_timestamp); } diff --git a/src/settings-ui/Settings.UI.Library/NewPlusProperties.cs b/src/settings-ui/Settings.UI.Library/NewPlusProperties.cs new file mode 100644 index 0000000000..2a4970c690 --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/NewPlusProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + public class NewPlusProperties + { + public const string ModuleName = "NewPlus"; + + public NewPlusProperties() + { + HideFileExtension = new BoolProperty(true); + HideStartingDigits = new BoolProperty(true); + TemplateLocation = new StringProperty(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates")); + } + + [JsonPropertyName("HideFileExtension")] + public BoolProperty HideFileExtension { get; set; } + + [JsonPropertyName("HideStartingDigits")] + public BoolProperty HideStartingDigits { get; set; } + + [JsonPropertyName("TemplateLocation")] + public StringProperty TemplateLocation { get; set; } + + public override string ToString() => JsonSerializer.Serialize(this); + } +} diff --git a/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs b/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs index 6010185f8c..2450898684 100644 --- a/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs +++ b/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs @@ -12,34 +12,27 @@ using Settings.UI.Library.Resources; namespace Microsoft.PowerToys.Settings.UI.Library { - public class NewPlusSettings : ISettingsConfig + public class NewPlusSettings : BasePTModuleSettings, ISettingsConfig { public const string ModuleName = "NewPlus"; + public const string ModuleVersion = "1.0"; - public void InitializeWithDefaultSettings() + [JsonPropertyName("properties")] + public NewPlusProperties Properties { get; set; } + + public NewPlusSettings() { - // This code path should never happen + Name = ModuleName; + Version = ModuleVersion; + Properties = new NewPlusProperties(); } - public string ToJsonString() - { - return JsonSerializer.Serialize(this); - } - - [JsonPropertyName("HideFileExtension")] - public bool HideFileExtension { get; set; } - - [JsonPropertyName("HideStartingDigits")] - public bool HideStartingDigits { get; set; } - - [JsonPropertyName("TemplateLocation")] - public string TemplateLocation { get; set; } - public string GetModuleName() { - return ModuleName; + return Name; } + // This can be utilized in the future if the settings.json file is to be modified/deleted. public bool UpgradeSettingsConfiguration() { return false; diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs index c72a52c7f7..7884a0994f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs @@ -130,7 +130,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels { var settingsUtils = new SettingsUtils(); var settings = NewPlusViewModel.LoadSettings(settingsUtils); - NewPlusViewModel.CopyTemplateExamples(settings.TemplateLocation); + NewPlusViewModel.CopyTemplateExamples(settings.Properties.TemplateLocation.Value); } } diff --git a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs index b1cceb8afb..cab1a9df77 100644 --- a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs @@ -47,9 +47,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels Settings = LoadSettings(settingsUtils); // Initialize properties - _hideFileExtension = Settings.HideFileExtension; - _hideStartingDigits = Settings.HideStartingDigits; - _templateLocation = Settings.TemplateLocation; + _hideFileExtension = Settings.Properties.HideFileExtension.Value; + _hideStartingDigits = Settings.Properties.HideStartingDigits.Value; + _templateLocation = Settings.Properties.TemplateLocation.Value; InitializeEnabledValue(); InitializeGpoValues(); @@ -119,12 +119,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels if (_templateLocation != value) { _templateLocation = value; - Settings.TemplateLocation = value; + Settings.Properties.TemplateLocation.Value = value; OnPropertyChanged(nameof(TemplateLocation)); NotifySettingsChanged(); - - SaveSettingsToJson(); } } } @@ -146,12 +144,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels if (_hideFileExtension != value && !_hideFileExtensionIsGPOConfigured) { _hideFileExtension = value; - Settings.HideFileExtension = value; + Settings.Properties.HideFileExtension.Value = value; OnPropertyChanged(nameof(HideFileExtension)); NotifySettingsChanged(); - - SaveSettingsToJson(); } } } @@ -168,12 +164,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels if (_hideStartingDigits != value) { _hideStartingDigits = value; - Settings.HideStartingDigits = value; + Settings.Properties.HideStartingDigits.Value = value; OnPropertyChanged(nameof(HideStartingDigits)); NotifySettingsChanged(); - - SaveSettingsToJson(); } } } @@ -208,10 +202,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels { settings = settingsUtils.GetSettingsOrDefault(NewPlusSettings.ModuleName); - if (string.IsNullOrEmpty(settings.TemplateLocation)) + if (string.IsNullOrEmpty(settings.Properties.TemplateLocation.Value)) { // This can happen when running the DEBUG Settings application without first letting the runner create the default settings file. - settings.TemplateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates"); + settings.Properties.TemplateLocation.Value = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates"); } } catch (Exception e) @@ -278,10 +272,5 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(App.GetSettingsWindow()); return await Task.FromResult(GetFolderDialogWithFlags(hwnd, FolderDialogFlags._BIF_NEWDIALOGSTYLE)); } - - private void SaveSettingsToJson() - { - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - } } } From 28b90d5f4917c65183e7b65648254ef18bc6cc46 Mon Sep 17 00:00:00 2001 From: Seraphima Zykova Date: Mon, 30 Sep 2024 19:23:21 +0300 Subject: [PATCH 11/54] [Workspaces]Fix application icons on ARM (#35146) fixed app path --- src/modules/Workspaces/WorkspacesLib/AppUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp index 389e54eae5..2d69d6f86f 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp @@ -26,11 +26,11 @@ namespace Utils constexpr const wchar_t* FileExplorerName = L"File Explorer"; constexpr const wchar_t* FileExplorerPath = L"C:\\WINDOWS\\EXPLORER.EXE"; - constexpr const wchar_t* SystemSettingsPath = L"SYSTEMSETTINGS.EXE"; constexpr const wchar_t* PowerToys = L"PowerToys.exe"; constexpr const wchar_t* PowerToysSettingsUpper = L"POWERTOYS.SETTINGS.EXE"; constexpr const wchar_t* PowerToysSettings = L"PowerToys.Settings.exe"; constexpr const wchar_t* ApplicationFrameHost = L"APPLICATIONFRAMEHOST.EXE"; + constexpr const wchar_t* Exe = L".EXE"; } AppList IterateAppsFolder() @@ -258,8 +258,8 @@ namespace Utils if (appPathUpper.contains(installPathUpper)) { - // check if the found app is the System Settings. If yes, update the install path to the exe path - if (appPathUpper.ends_with(NonLocalizable::SystemSettingsPath)) + // Update the install path to keep .exe in the path + if (!installPathUpper.ends_with(NonLocalizable::Exe)) { auto settingsAppData = appData; settingsAppData.installPath = appPath; From 6c17fae14855ec5f18f7fbe0253b5d3e7307b477 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 30 Sep 2024 11:04:49 -0700 Subject: [PATCH 12/54] Removed build status from readme (#35113) Removed build status --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 7bdc0becf0..c178872a61 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,6 @@ [How to use PowerToys][usingPowerToys-docs-link] | [Downloads & Release notes][github-release-link] | [Contributing to PowerToys](#contributing) | [What's Happening](#whats-happening) | [Roadmap](#powertoys-roadmap) -## Build status - -| Architecture | Solution (Main) | Solution (Stable) | Installer (Main) | -|--------------|-----------------|-------------------|------------------| -| x64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=stable&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=stable) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_x64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) | -| ARM64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_arm64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) | - ## About Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. For more info on [PowerToys overviews and how to use the utilities][usingPowerToys-docs-link], or any other tools and resources for [Windows development environments](https://learn.microsoft.com/windows/dev-environment/overview), head over to [learn.microsoft.com][usingPowerToys-docs-link]! From ccdfbb0f685c42700e7ac0381edd5972cc645892 Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:52:49 +0200 Subject: [PATCH 13/54] [Workspaces]Fix Workspace icon when installed, move to assets (#35163) * [Workspaces] fix defaulticon.ico, move it to the Assets directory * Move assets to single source of truth. Installer logic --------- Co-authored-by: Stefan Markovic --- .../PowerToysSetup/PowerToysInstaller.wixproj | 2 ++ installer/PowerToysSetup/Product.wxs | 1 + installer/PowerToysSetup/Workspaces.wxs | 31 ++++++++++++++++++ .../generateAllFileComponents.ps1 | 4 +++ .../PowerToysSetupCustomActions.vcxproj | 1 + .../Workspaces}/DefaultIcon.ico | Bin .../Assets/{ => Workspaces}/Workspaces.ico | Bin .../WorkspacesEditor/Models/Application.cs | 2 +- .../WorkspacesEditor/WorkspacesEditor.csproj | 15 +++------ .../WorkspacesEditor/images/Workspaces.ico | Bin 467385 -> 0 bytes .../WorkspacesLauncherResource.base.rc | 2 +- .../Models/AppLaunching.cs | 2 +- .../WorkspacesLauncherUI.csproj | 18 ++++------ .../images/DefaultIcon.ico | Bin 112730 -> 0 bytes .../images/Workspaces.ico | Bin 467385 -> 0 bytes .../WorkspacesSnapshotToolResources.base.rc | 2 +- .../WorkspacesWindowArrangerResource.base.rc | 2 +- 17 files changed, 55 insertions(+), 27 deletions(-) create mode 100644 installer/PowerToysSetup/Workspaces.wxs rename src/modules/Workspaces/{WorkspacesEditor/images => Assets/Workspaces}/DefaultIcon.ico (100%) rename src/modules/Workspaces/Assets/{ => Workspaces}/Workspaces.ico (100%) delete mode 100644 src/modules/Workspaces/WorkspacesEditor/images/Workspaces.ico delete mode 100644 src/modules/Workspaces/WorkspacesLauncherUI/images/DefaultIcon.ico delete mode 100644 src/modules/Workspaces/WorkspacesLauncherUI/images/Workspaces.ico diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index 6d9ca4a6c5..2826a68493 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -54,6 +54,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil call move /Y ..\..\..\VideoConference.wxs.bk ..\..\..\VideoConference.wxs call move /Y ..\..\..\WinAppSDK.wxs.bk ..\..\..\WinAppSDK.wxs call move /Y ..\..\..\WinUI3Applications.wxs.bk ..\..\..\WinUI3Applications.wxs + call move /Y ..\..\..\Workspaces.wxs.bk ..\..\..\Workspaces.wxs @@ -125,6 +126,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil + diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 3a30002a37..7a3a6ee697 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -79,6 +79,7 @@ + diff --git a/installer/PowerToysSetup/Workspaces.wxs b/installer/PowerToysSetup/Workspaces.wxs new file mode 100644 index 0000000000..4237aab945 --- /dev/null +++ b/installer/PowerToysSetup/Workspaces.wxs @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 index 42864c392c..50ce0f2dd6 100644 --- a/installer/PowerToysSetup/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -317,3 +317,7 @@ Generate-FileComponents -fileListName "SettingsV2AssetsFiles" -wxsFilePath $PSSc Generate-FileComponents -fileListName "SettingsV2AssetsModulesFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot Generate-FileComponents -fileListName "SettingsV2OOBEAssetsModulesFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot Generate-FileComponents -fileListName "SettingsV2OOBEAssetsFluentIconsFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot + +#Workspaces +Generate-FileList -fileDepsJson "" -fileListName WorkspacesImagesComponentFiles -wxsFilePath $PSScriptRoot\Workspaces.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\Assets\Workspaces\" +Generate-FileComponents -fileListName "WorkspacesImagesComponentFiles" -wxsFilePath $PSScriptRoot\Workspaces.wxs -regroot $registryroot diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index af6a0f184b..959a600706 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -76,6 +76,7 @@ call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs"" ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs"" ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\WinUI3Applications.wxs"" ""$(ProjectDir)..\PowerToysSetup\WinUI3Applications.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Workspaces.wxs"" ""$(ProjectDir)..\PowerToysSetup\Workspaces.wxs.bk"""" if not "$(NormalizedPerUserValue)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform) if "$(NormalizedPerUserValue)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform) -installscopeperuser $(NormalizedPerUserValue) diff --git a/src/modules/Workspaces/WorkspacesEditor/images/DefaultIcon.ico b/src/modules/Workspaces/Assets/Workspaces/DefaultIcon.ico similarity index 100% rename from src/modules/Workspaces/WorkspacesEditor/images/DefaultIcon.ico rename to src/modules/Workspaces/Assets/Workspaces/DefaultIcon.ico diff --git a/src/modules/Workspaces/Assets/Workspaces.ico b/src/modules/Workspaces/Assets/Workspaces/Workspaces.ico similarity index 100% rename from src/modules/Workspaces/Assets/Workspaces.ico rename to src/modules/Workspaces/Assets/Workspaces/Workspaces.ico diff --git a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs index 9f7be13742..c31087c20c 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs @@ -247,7 +247,7 @@ namespace WorkspacesEditor.Models { Logger.LogWarning($"Icon not found on app path: {AppPath}. Using default icon"); IsNotFound = true; - _icon = new Icon(@"images\DefaultIcon.ico"); + _icon = new Icon(@"Assets\Workspaces\DefaultIcon.ico"); } } diff --git a/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditor.csproj b/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditor.csproj index 50ec21ea11..aa359291eb 100644 --- a/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditor.csproj +++ b/src/modules/Workspaces/WorkspacesEditor/WorkspacesEditor.csproj @@ -23,16 +23,12 @@ - images\Workspaces.ico + ..\Assets\Workspaces\Workspaces.ico app.manifest PowerToys.WorkspacesEditor - - - - tlbimp @@ -54,10 +50,10 @@ - - Always + + Assets\Workspaces\%(Filename)%(Extension) + PreserveNewest - @@ -100,7 +96,4 @@ Settings.Designer.cs - - <_DeploymentManifestIconFile Remove="images\Workspaces.ico" /> - \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesEditor/images/Workspaces.ico b/src/modules/Workspaces/WorkspacesEditor/images/Workspaces.ico deleted file mode 100644 index 14292758fa2a98ddd72db0cfa95c2cfa63997e1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 467385 zcmXVX2Uru&^Y?`okP-!z-b4hY3JOSX3W|!N(xggNs`Qcu2#A6dDI!8ZR8%?$NDm^? z3B3hK5a}hfkPt}n=KKEsd7k8MZufR)cV<2_v%3KR5Wo%m_W=PCz}^c07-!t0(f^}m zEtr7rSOEC(rEO|D!#H7}vjSfP}>Vm7fHFr^jr7fWZIgmmG}u zxxv8c)BmG?vH?K$Suk*tQSU$gJy`(Yz9<+-xOdlt`-IR5006jeni^aDSNh+VolzgK z3;5~|07&4bvBATz>CI-Fz=s~0iY1;gGTPpsA5L_1RDyE4xzu8~f2pa?ZhBhi27Az= zo?<7<0;YadbHD66z5JR`*3lo@)3?WUt3c3vlI{HbE7@Su#a-B3 zp6PAui_H1%rB7mEg}$o7xt;2cKW!&a4^cr%8bEl4-JcPnDWxr z$IaAg_hi{J7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kz~nO%Q~dD``C5B&kGi;`Q2weeyQ uSSAv$u$-tuw0F?BOw>i|fmR=_0owJ2Sa1HR)V - images\Workspaces.ico + ..\Assets\Workspaces\Workspaces.ico app.manifest PowerToys.WorkspacesLauncherUI + - - + + Assets\Workspaces\%(Filename)%(Extension) + PreserveNewest + + tlbimp @@ -53,14 +57,6 @@ true - - - Always - - - Always - - diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/images/DefaultIcon.ico b/src/modules/Workspaces/WorkspacesLauncherUI/images/DefaultIcon.ico deleted file mode 100644 index 70279d6a4fc391900c32f61e8e124d6c070f6b2b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112730 zcmeFa2UHbHw=TK}5|j)|&OyWk2m(r!B&aAzFaRQ=n2;orVUZUZ$vH^|0Rt+afRY6S zB*(SLl7r+_uNt@i+3&t__dai&t@rLRVEB!yu3p_$^ZVwUHM?01Q7AkV5eoUiLvf&{ zgi)wFu#ZOnIOZq8Lus5qp=4$MI6i|y*`3Bi2@3u=&frC%k{#id9Df{Bp-`&N@K98+ zMecW(5QSQJg@^LKq^3;1muWA&HMz=J1r6jZ0up3uU5gAjr|>Hk1vyQd?&-LO0G_Mi z9bioVgmqwGea`2s+(&lbqMj+k2Laqe&AGdk+}*_gH4Qn zM0%M{=$V@STWKlc(hVJe8CuR;(24<4`4~b}={J zzB-`5L;22U^@RrB*CkLKdABSArT9H>O0wC9p}wld>!&+Mlq&LMMJzQm*7k(TXq$@p4V{_MQ%;^b6|l}E zOV@^uqCOKje0SM|@cr20k|=esR)TWBvJ{@#hrpXG+)J+C7LU8w*jzk8*@ksA6hPmM z6@+(=&EAX;+lz~>KP@EuwL3vZ<#w1gZG)?)kf`Ed>ZYVPpJ1IOO?(!i0oVJREEFMK zD7JN+X*WqdFqPczQ<+^+AQ-lBUAI>x$aST`=^)xaghTbFbOF7ALt>&^fdmzw3`6za zXBGKod%cLq#&|BE3aTGsBdMDN)grf4QOx@!zi(x4f4Ct;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L$Hb@O}Ep z#87`q-@+Ls-9h`>+M?OFu#{PJ IB+z&MKN#DTOaK4? diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/images/Workspaces.ico b/src/modules/Workspaces/WorkspacesLauncherUI/images/Workspaces.ico deleted file mode 100644 index 14292758fa2a98ddd72db0cfa95c2cfa63997e1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 467385 zcmXVX2Uru&^Y?`okP-!z-b4hY3JOSX3W|!N(xggNs`Qcu2#A6dDI!8ZR8%?$NDm^? z3B3hK5a}hfkPt}n=KKEsd7k8MZufR)cV<2_v%3KR5Wo%m_W=PCz}^c07-!t0(f^}m zEtr7rSOEC(rEO|D!#H7}vjSfP}>Vm7fHFr^jr7fWZIgmmG}u zxxv8c)BmG?vH?K$Suk*tQSU$gJy`(Yz9<+-xOdlt`-IR5006jeni^aDSNh+VolzgK z3;5~|07&4bvBATz>CI-Fz=s~0iY1;gGTPpsA5L_1RDyE4xzu8~f2pa?ZhBhi27Az= zo?<7<0;YadbHD66z5JR`*3lo@)3?WUt3c3vlI{HbE7@Su#a-B3 zp6PAui_H1%rB7mEg}$o7xt;2cKW!&a4^cr%8bEl4-JcPnDWxr z$IaAg_hi{J7`;&l&3Pf{fH(mD;JHyVy|o*4bS^Nw?3rwmalcPa75!?J)d8jX)-m*( zbWdHz2wG$j>k2!A#yTNm{wO{b|IM0sN`I!+%jI#TCAVw&2JvxJOa1^N40)iFkL|KHe77oK(sbebF#5=hb_xud9Isqnn(ybr8_$v|jAt`|y>S)L&;6 ziej7={t}Y++=>3ieYy=EH_ya$LZ05G5yg;zr(?N+-Yt;8XLm2tu8i+5gQkJkj<-0@ zN}t(fQ4BNX@)US@>z`iy0^hsu5{?ZYsO5RhTa*^vp1Lz1muiJ2{X@I`Y-W*eEiu+0sdNf&q&-c0!Y5&uajJR7vWs@swY;(PH%e&HOo6Dx z&^#Rhqnp0EN&kes?3T^K*$sP{{ROYRI|LhiG^Y98%8^ZHzs7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wks{V|L(NtkB%+5Rh>kfggOQGFxUMfq{(%bIyd`CopVBbjW$H#)Wqwd z-&a%L7ElLjeQWmS@H+)luhDz)Aof9;S)KhAxqgeB4+p-+{b@%mhCV;{L7+aTo?Q=& z$XSup82MKFK;PsBCe-Je&fLV~z)ek_q18=c^~@N9O%vJ&8j&`0c`{N014jSDzmC`w z^|#gy?1>M8<`iJlux}ujrDyd{9mui(z9F$Nj`pS?0sf}j!ma2#k5ijZl#FIrAu+C{eV%f|oD0&ZiYjLA< zqOTSO@$#va3YFP2-d_yN`W>-G0c7oVIu$zluiDM?5B`cBd8S~ajggy^A< z`c%R`*H;x#2d!wQx_q;-`DE>*aGf-MeHb0BCvdOT^G%a{+~sx88fd3Dqsr=djh$W#e05qOC_*PxDqZi@>j3e1~ zUSe4A3GEtBI#}QN|K(MnB7G<9)#L0N;~V(Jq$JsIh5ZJ)2#N#nn8oiud# zytS<1zv=_{Mg+`PprFC@mJ5?cxL-U>yV$U{h+*- zSzK?1HuqJ^c?$Vx!ve_TtlA#y;jhL&a6TXB&!9eF>>;nSYWQg{)u|AEkK>##Z`PSJ zpi#heIvdaYa^wbX#5%S1W!Ob;RvUcib*z8PwVi}gSCiz;8>i$;En3yE0(zqbrkz~nO%Q~dD``C5B&kGi;`Q2weeyQ uSSAv$u$-tuw0F?BOw>i|fmR=_0owJ2Sa1HR)V Date: Tue, 1 Oct 2024 18:54:01 +0100 Subject: [PATCH 14/54] 0.85 changelog (#35095) * 0.85 changelog * Mention ZoomIt * Update README.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Address PR feedback * Update with latest repo changes * Update binary hashes * Fix spellcheck * GPO line in General instead --------- Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> --- README.md | 146 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index c178872a61..c8d1fd21b2 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline | [Environment Variables](https://aka.ms/PowerToysOverview_EnvironmentVariables) | [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) | | [File Locksmith](https://aka.ms/PowerToysOverview_FileLocksmith) | [Hosts File Editor](https://aka.ms/PowerToysOverview_HostsFileEditor) | [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) | | [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) | [Mouse utilities](https://aka.ms/PowerToysOverview_MouseUtilities) | [Mouse Without Borders](https://aka.ms/PowerToysOverview_MouseWithoutBorders) | -| [Peek](https://aka.ms/PowerToysOverview_Peek) | [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) | -| [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) | -| [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) | -| [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) | [Workspaces](https://aka.ms/PowerToysOverview_Workspaces) | +| [New+](https://aka.ms/PowerToysOverview_NewPlus) | [Peek](https://aka.ms/PowerToysOverview_Peek) | [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | +| [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) | [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | +| [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) | [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | +| [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) | [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) | [Workspaces](https://aka.ms/PowerToysOverview_Workspaces) | ## Installing and running Microsoft PowerToys @@ -34,19 +34,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user. -[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.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 +[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.86%22 +[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.85%22 +[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysUserSetup-0.85.0-x64.exe +[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysUserSetup-0.85.0-arm64.exe +[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysSetup-0.85.0-x64.exe +[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysSetup-0.85.0-arm64.exe | Description | Filename | sha256 hash | |----------------|----------|-------------| -| 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 | +| Per user - x64 | [PowerToysUserSetup-0.85.0-x64.exe][ptUserX64] | 28A8BEA61040751287FF47C9BAC627A53A4670CFEA0C17B96EE947219E9A6EA9 | +| Per user - ARM64 | [PowerToysUserSetup-0.85.0-arm64.exe][ptUserArm64] | 2CA077E842B7C53BAFC75A25DBD16C1A4FCE20924C36FDA5AD8CF23CD836B855 | +| Machine wide - x64 | [PowerToysSetup-0.85.0-x64.exe][ptMachineX64] | 4A248AA914EEE339AA99D467FDFBDB1FCD7A49A8564DDBBB811D0EC69CEBAB75 | +| Machine wide - ARM64 | [PowerToysSetup-0.85.0-arm64.exe][ptMachineArm64] | B5FB04EAF44C4203E785411FF55025842B9C39D4970C0C934CB8ADBE79EF31AF | This is our preferred method. @@ -92,99 +92,117 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/ Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on. -### 0.84 - August 2024 Update +### 0.85 - September 2024 Update -In this release, we focused on adding a new utility (PowerToys Workspaces), Advanced paste custom actions feature, stability, and improvements. +In this release, we focused on new features, stability, and improvements. **Highlights** - - New utility: PowerToys Workspaces - this utility can launch a set of applications to a custom layout and configuration on the desktop. App arrangements can be saved as a workspace and then relaunched with one click from the Workspaces Editor or from a desktop shortcut. In the editor, app configuration can be customized using CLI arguments and "launch as admin" modifiers, and app window sizes and positions can be updated as desired. This is our first public version of Workspaces and we are excited for you to try it out for yourself! Make sure to file issues you encounter on our GitHub so the team can continue to improve the utility. - - Known issues - the team is actively working on fixing these: - - Apps that launch as admin are unable to be repositioned to the desired layout. - - Border of "Remove" / "Add Back" app button in editor is not clearly visible on light themes. - - Added Awake --use-parent-pid CLI argument to attach to parent process. Thanks [@dend](https://github.com/dend)! - - Added custom actions - user-specified pre-defined prompts for the AI model. Additionally, actions (both standard and custom) are now searchable from prompt box and Ctrl + number in-app shortcuts are now applicable for first 9 search results. - - Ported all C++/CX code to C++/WinRT as part of a refactor and upgrade series aimed at enabling AOT (Ahead of Time) compilation for enhanced performance and reduced disk footprint. + - New utility: New+ - allows setting a personalized set of templates to quickly create files and folders from a File Explorer context menu. Thanks [@cgaarden](https://github.com/cgaarden)! + - Language selection - it's now possible to select which UI language should be used by PowerToys utilities. + - Lots of quality fixes for Workspaces, improving the number of supported applications. + - Reduced Peek memory usage by fixing image leaks. Thanks [@daverayment](https://github.com/daverayment)! ### General - - Added DSC support for ImageResizer resize sizes property. - + - Added a general setting to select which UI language should be used in PowerToys utilities. + - Fixed internal code of some policies for Group Policy Objects, that were reading registry entries using the wrong internal functions, and structured code better to avoid future mistakes of the same kind. Thanks [@htcfreek](https://github.com/htcfreek)! + ### Advanced Paste - - Added custom actions - user-specified pre-defined prompts for the AI model. Additionally, actions (both standard and custom) are now searchable from prompt box and Ctrl + number in-app shortcuts are now applicable for first 9 search results. + - Fixed some telemetry calls to signal Advanced Paste activation on the cases where a direct shortcut is being used without showing the UI. + - User-defined custom actions can only be used with AI turned on, so custom actions were disabled on Settings when AI is disabled and were hidden from the Advanced Paste UI. ### Awake - - Added --use-parent-pid CLI argument to attach to parent process and fixed issue causing tray icon to disappear. Thanks [@dend](https://github.com/dend)! + - Fixed tray icon behaviors, not appearing and showing incorrect time. Thanks [@dend](https://github.com/dend)! -### Hosts File Editor +### Environment Variables Editor - - Fixed save failure when the hosts file is hidden. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Added the `_NT_SYMBOL_PATH`, `_NT_ALT_SYMBOL_PATH` and `_NT_SYMCACHE_PATH` as variables that are shown as lists. Thanks [@chwarr](https://github.com/chwarr)! -### File Explorer add-ons +### FancyZones - - Fixed multiple preview form positioning issues causing floating, detached windows, CoreWebView2 related exception and process leak. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Allow snapping applications that were launched by Workspaces. -### Keyboard Manager +### File Locksmith - - Convert RemapBufferRow to a struct with descriptive field names. Thanks [@masaru-iritani](https://github.com/masaru-iritani)! - - Fixed issue causing stuck Ctrl key when shortcuts contain AltGr key. + - Fixed an issue causing File Locksmith to be triggered by unrelated verbs in the context menu. + +### Mouse Pointer Crosshairs + + - Allow crosshairs radius to be 0 pixels. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)! + +### New+ + + - New utility - Allows setting a personalized set of templates to quickly create files and folders from a File Explorer context menu. Thanks [@cgaarden](https://github.com/cgaarden)! + - Added missing entry for New+ policy state reporting in the Bug Report tool. Thanks [@htcfreek](https://github.com/htcfreek)! + - Added a policy for enabling/disabling whether filename extensions should be shown. Thanks [@htcfreek](https://github.com/htcfreek)! ### Peek - - Added long paths support. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - -### Quick Accent - - - Moved number superscripts and subscripts from Portuguese to all languages definition. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)! - -### PowerRename - - - Updated the tooltip text of the replace box info button. Thanks [@Agnibaan](https://github.com/Agnibaan)! + - Properly show file's modified date instead of creation date in the file previewer. Thanks [@daverayment](https://github.com/daverayment)! + - Fixed memory leak caused by unmanaged bitmap images not being freed. Thanks [@daverayment](https://github.com/daverayment)! + - Fixed an issue causing Peek to not be displayed the first time when using a preview handler to display files. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Prevent tooltip in file previewer from overlapping with title bar controls. Thanks [@daverayment](https://github.com/daverayment)! + - Fixed memory leaks in thumbnails and refactored image previewer. Thanks [@daverayment](https://github.com/daverayment)! ### PowerToys Run - - Fixed window positioning on start-up introduced in 0.83. - - Improved default web browser detection. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Fixed volume ounces conversion to support both imperial and metric. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)! - - Fixed thread-safety issue causing results not to be shown on first launch. + - Improved the message boxes to be more specific when PowerToys Run failed to initialize itself or any plugin. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Use capital letters when showing degree results in the Unit Converter plugin. Thanks [@PesBandi](https://github.com/PesBandi)! -### Screen Ruler +### Quick Accent - - Added multiple measurements support for all measuring tools. + - Add the Middle Eastern Romanization character set. Thanks [@PesBandi](https://github.com/PesBandi)! + - Add the degree sign, integral and vertical ellipsis when "All Languages" is selected. Thanks [@rddunphy](https://github.com/rddunphy)! ### Settings - - Improved disabled animations InfoBar in Find My Mouse page. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Fixed the link to the Workspaces documentation. (This was a hotfix for 0.84) + - Fixed flyout issues after the Windows App SDK upgrade. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Fixed initialization for the New+ settings page. Thanks [@htcfreek](https://github.com/htcfreek)! + - Fixed enabled state of a control on the New+ settings page if the module is enabled by policy. Thanks [@htcfreek](https://github.com/htcfreek)! + - Fixed a crash when cancelling the template folder selection in the New+ settings page. ### Workspaces - - New utility: PowerToys Workspaces - this utility can launch a set of applications to a custom layout and configuration on the desktop. App arrangements can be saved as a workspace and then relaunched with one click from the Workspaces Editor or from a desktop shortcut. In the editor, app configuration can be customized using CLI arguments and "launch as admin" modifiers, and app window sizes and positions can be updated as desired. This is our first public version of Workspaces and we are excited for you to try it out for yourself! Make sure to file issues you encounter on our GitHub so the team can continue to improve the utility. + - Fixed detecting and snapping applications like Discord. (This was a hotfix for 0.84) + - Fixed detecting and snapping applications like Steam. (This was a hotfix for 0.84) + - Fixed button visibility in the UI. (This was a hotfix for 0.84) + - Fixed an issue launching the wrong project when the editor was closed without saving or cancelling a new project. + - Properly handle repositioning windows running as administrator. + - Properly handle cases where the monitor where a workspace was saved is no longer present. + - Fixed the workspace launcher restarting itself in a loop without success. + - Properly handle standalone applications. + - Fixed issues causing icons to not show. ### Documentation - - Added ChatGPTPowerToys plugin mention to thirdPartyRunPlugins.md. Thanks [@ferraridavide](https://github.com/ferraridavide)! + - Fixed the thirdPartyRunPlugins.md entry for the RDP plugin. Thanks [@YisroelTech](https://github.com/YisroelTech)! ### Development - - Ported all C++/CX code to C++/WinRT. - - Moved Version.props import to Directory.Build.props. - - Extracted self-containment related .csproj properties to src/Common.SelfContained.props. - - Unused and obsolete dependencies cleanup. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Extracted CSWinRT related .csproj properties to src/Common.Dotnet.CsWinRT.props. - - Upgraded Microsoft.Windows.CsWinRT to 2.0.8 and updated verifyDepsJsonLibraryVersions.ps1 to unblock PRs. - - Explicitly Set NuGet Audit Mode to Direct in Directory.Build.props to revert changes made with VS 17.12 update. Thanks [@snickler](https://github.com/snickler)! - - Upgraded UnitsNet to 5.56.0. + - Upgraded Windows App SDK to 1.6. + - Upgraded the Target Platform Version to 10.0.22621.0. + - Added a bot trigger to automatically add a label to Workspaces issues. Thanks [@plante-msft](https://github.com/plante-msft)! + - Fixed a regular expression in the bot triggers for wanting to submit community contributions. Thanks [@PesBandi](https://github.com/PesBandi)! + - Fixed analyzer errors after the Visual Studio 17.12 update. Thanks [@snickler](https://github.com/snickler)! + - Fixed the TSA configuration for release CI builds. + - Refactored automated file component generation during installer builds. + - Rewrote the Azure Devops build system to be more modular and share more definitions between PR CI and Release CI. + - Fixed debugging of the New+ page of the Settings application when a settings file was not present. + - Fixed setting the version of the App Manifest in the File Locksmith and New+ context menu app packages. + - Fixed abstracted UI library nuget package signing on release CI. + - Removed build status from GitHub README. -#### What is being planned for version 0.84 +#### What is being planned for version 0.86 -For [v0.85][github-next-release-work], we'll work on the items below: +For [v0.86][github-next-release-work], we'll work on the items below: - Stability / bug fixes - - Language selection - New module: File Actions Menu - - New module: New+ + - Integrate Sysinternals ZoomIt ## PowerToys Community From bcb5ce895ca4712a5f9f20dc00df3a3bacc7601a Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Thu, 3 Oct 2024 15:08:28 +0100 Subject: [PATCH 15/54] [New+]Fix call enabled telemetry event (#35236) --- .../powertoys_module.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp index 2e6dccfdee..303f072e3b 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp @@ -91,6 +91,9 @@ public: { Logger::info("New+ enabled via Settings UI"); + // Log telemetry + Trace::EventToggleOnOff(true); + newplus::utilities::register_msix_package(); powertoy_new_enabled = true; @@ -99,8 +102,7 @@ public: virtual void disable() override { Logger::info("New+ disabled via Settings UI"); - - powertoy_new_enabled = false; + Disable(true); } virtual bool is_enabled() override @@ -125,12 +127,23 @@ public: virtual void destroy() override { + Disable(false); delete this; } private: bool powertoy_new_enabled = false; + void Disable(bool const traceEvent) + { + // Log telemetry + if (traceEvent) + { + Trace::EventToggleOnOff(false); + } + powertoy_new_enabled = false; + } + void init_settings() { powertoy_new_enabled = NewSettingsInstance().GetEnabled(); From 577044163e53448f2bee154fd72d6e6e1e296cd0 Mon Sep 17 00:00:00 2001 From: Seraphima Zykova Date: Thu, 3 Oct 2024 17:09:13 +0300 Subject: [PATCH 16/54] [Workspaces]Fix launching incorrect workspace via shortcut (#35233) ensure one launcher instance is running --- src/modules/Workspaces/WorkspacesLauncher/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/Workspaces/WorkspacesLauncher/main.cpp b/src/modules/Workspaces/WorkspacesLauncher/main.cpp index 38e88acd48..9f3d151097 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/main.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/main.cpp @@ -16,6 +16,7 @@ const std::wstring moduleName = L"Workspaces\\WorkspacesLauncher"; const std::wstring internalPath = L""; +const std::wstring instanceMutexName = L"Local\\PowerToys_WorkspacesLauncher_InstanceMutex"; int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cmdShow) { @@ -28,6 +29,18 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm return 0; } + auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str()); + if (mutex == nullptr) + { + Logger::error(L"Failed to create mutex. {}", get_last_error_or_default(GetLastError())); + } + + if (GetLastError() == ERROR_ALREADY_EXISTS) + { + Logger::warn(L"WorkspacesLauncher instance is already running"); + return 0; + } + std::wstring cmdLineStr{ GetCommandLineW() }; auto cmdArgs = split(cmdLineStr, L" "); if (cmdArgs.workspaceId.empty()) From e7175302c9226d7fab8ef3d9271abd188758ffbb Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Thu, 3 Oct 2024 17:24:23 +0100 Subject: [PATCH 17/54] [Settings]Fix crash showing non-existent New+ template folder (#35237) [Settings]Fix crash showing non-existent template folder --- .../ViewModels/NewPlusViewModel.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs index cab1a9df77..1a92af09da 100644 --- a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs @@ -250,12 +250,21 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private void OpenNewTemplateFolder() { - var process = new ProcessStartInfo() + try { - FileName = _templateLocation, - UseShellExecute = true, - }; - Process.Start(process); + CopyTemplateExamples(_templateLocation); + + var process = new ProcessStartInfo() + { + FileName = _templateLocation, + UseShellExecute = true, + }; + Process.Start(process); + } + catch (Exception ex) + { + Logger.LogError("Failed to show NewPlus template folder.", ex); + } } private async void PickNewTemplateFolder() From 300d44f17bb1a631e3538d54369fc2cbf0a6e1e1 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 7 Oct 2024 09:44:25 -0700 Subject: [PATCH 18/54] Adjusting 8LWXpg user name in so it doesn't throw a spell check (#35221) * Update names.txt * Update expect.txt * Update expect.txt --- .github/actions/spell-check/allow/names.txt | 1 - .github/actions/spell-check/expect.txt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/spell-check/allow/names.txt b/.github/actions/spell-check/allow/names.txt index 95c1427b9d..97638a1684 100644 --- a/.github/actions/spell-check/allow/names.txt +++ b/.github/actions/spell-check/allow/names.txt @@ -28,7 +28,6 @@ videoconference # USERS -LWXpg # (number eight)LWXpg is actual user name but spell checker throws error with a numeric leading value ... which is kinda odd Adoumie Advaith alekhyareddy diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 47662c3766..8ff275bc95 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1,6 +1,9 @@ # FALSE POSITIVES ## "PackagemanagerWrapper.cs" should be "PackageManagerWrapper.cs" ## NOTICE.MD > MOZILLA PUBLIC LICENSE v1.1 + +# user name but user folder causes a flag +8LWXpg aaaa abcdefghjkmnpqrstuvxyz abgr From 10b868717411f074c6cc1509c3b8182a05981a19 Mon Sep 17 00:00:00 2001 From: Ethan Fang <117125208+ethanfangg@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:42:14 -0700 Subject: [PATCH 19/54] Updated README.md for 0.85.1 release (#35296) --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8d1fd21b2..aa0648fb40 100644 --- a/README.md +++ b/README.md @@ -36,17 +36,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.86%22 [github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.85%22 -[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysUserSetup-0.85.0-x64.exe -[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysUserSetup-0.85.0-arm64.exe -[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysSetup-0.85.0-x64.exe -[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.0/PowerToysSetup-0.85.0-arm64.exe - +[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.1/PowerToysUserSetup-0.85.1-x64.exe +[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.1/PowerToysUserSetup-0.85.1-arm64.exe +[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.1/PowerToysSetup-0.85.1-x64.exe +[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.85.1/PowerToysSetup-0.85.1-arm64.exe + | Description | Filename | sha256 hash | |----------------|----------|-------------| -| Per user - x64 | [PowerToysUserSetup-0.85.0-x64.exe][ptUserX64] | 28A8BEA61040751287FF47C9BAC627A53A4670CFEA0C17B96EE947219E9A6EA9 | -| Per user - ARM64 | [PowerToysUserSetup-0.85.0-arm64.exe][ptUserArm64] | 2CA077E842B7C53BAFC75A25DBD16C1A4FCE20924C36FDA5AD8CF23CD836B855 | -| Machine wide - x64 | [PowerToysSetup-0.85.0-x64.exe][ptMachineX64] | 4A248AA914EEE339AA99D467FDFBDB1FCD7A49A8564DDBBB811D0EC69CEBAB75 | -| Machine wide - ARM64 | [PowerToysSetup-0.85.0-arm64.exe][ptMachineArm64] | B5FB04EAF44C4203E785411FF55025842B9C39D4970C0C934CB8ADBE79EF31AF | +| Per user - x64 | [PowerToysUserSetup-0.85.1-x64.exe][ptUserX64] | 5F287C34BF68972C55D7C26585EA5C449B0DBA7D458BF7039CFF448E1D7B732B | +| Per user - ARM64 | [PowerToysUserSetup-0.85.1-arm64.exe][ptUserArm64] | 6D5C3B24156E6E66FD38AD15076B8442F0A1C5CFCBBDC33AD478FB27E5E086AE | +| Machine wide - x64 | [PowerToysSetup-0.85.1-x64.exe][ptMachineX64] | 1CDD3C9602F6E5DDC19C66A4FDFE4231389C08E6A037DD22C0A6471F10C7BE02 | +| Machine wide - ARM64 | [PowerToysSetup-0.85.1-arm64.exe][ptMachineArm64] | 6F4DC0217495973B974B7AC1099FD01A2A0FCEE96E8719074EC97FBBC0ECAC4A | This is our preferred method. From 07ec7980d16ebe6376fe52c66c8115f445a1a891 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Tue, 8 Oct 2024 14:12:54 -0500 Subject: [PATCH 20/54] ci: move the precheck dependency+condition up to the stage (#35321) This should prevent the tests from running (and failing) when PreCheck skips the build. --- .pipelines/v2/templates/pipeline-ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/v2/templates/pipeline-ci-build.yml b/.pipelines/v2/templates/pipeline-ci-build.yml index 17f4654ccd..5410cd030b 100644 --- a/.pipelines/v2/templates/pipeline-ci-build.yml +++ b/.pipelines/v2/templates/pipeline-ci-build.yml @@ -32,12 +32,12 @@ stages: displayName: Build ${{ platform }} ${{ if ne(variables['Build.Reason'], 'Manual') }}: dependsOn: [Precheck] + condition: and(succeeded(), ne(dependencies.Precheck.outputs['Precheck.verifyBuildRequest.skipBuild'], 'Yes')) ${{ else }}: dependsOn: [] jobs: - template: job-build-project.yml parameters: - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Manual'), ne(stageDependencies.Precheck.Precheck.outputs['verifyBuildRequest.skipBuild'], 'Yes'))) pool: ${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}: name: SHINE-INT-L From 2146dff3bfc374ceec466e4c6f091d47f08be130 Mon Sep 17 00:00:00 2001 From: Aaron Junker-Wildi Date: Thu, 10 Oct 2024 01:00:51 +0200 Subject: [PATCH 21/54] Add the new issue types to the issue templates (#35352) We added issue types to our GitHub org. This PR adds those to the corresponding issue templates. --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 1 + .github/ISSUE_TEMPLATE/translation_issue.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 56800fb1d6..f2eb897a4d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,6 @@ name: "🕷️ Bug report" description: Report errors or unexpected behavior +type: Bug labels: - Issue-Bug - Needs-Triage diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index ade50bf5f5..d7d092dbca 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,6 @@ name: "⭐ Feature or enhancement request" description: Propose something new. +type: Feature labels: - Needs-Triage body: diff --git a/.github/ISSUE_TEMPLATE/translation_issue.yml b/.github/ISSUE_TEMPLATE/translation_issue.yml index 7cb712df30..69787a3ed6 100644 --- a/.github/ISSUE_TEMPLATE/translation_issue.yml +++ b/.github/ISSUE_TEMPLATE/translation_issue.yml @@ -1,5 +1,6 @@ name: "🌐 Localization/Translation issue" description: Report incorrect translations. +type: Bug labels: - Issue-Bug - Area-Localization From e1231235fe98eca4573f9ba40a71d4921bf5cf89 Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:02:40 -0400 Subject: [PATCH 22/54] [Security][Deps]Update System.Text.Json, System.Runtime.Caching and their dependencies to latest versions (#35353) * [Deps] Update System.Text.Json to 8.0.5 * [Deps] Update System.Runtime.Caching to 8.0.1 * Update NOTICE.md * [Deps] Update Microsoft.Windows.Compatibility to 8.0.10 * Update NOTICE.md * Hack cleanup --------- Co-authored-by: Jaime Bernardo --- Directory.Packages.props | 20 +++++++--------- NOTICE.md | 16 ++++++------- .../Hosts/Hosts.Tests/Hosts.Tests.csproj | 4 ---- ....PowerToys.Run.Plugin.UnitConverter.csproj | 8 ------- ...werToys.Run.Plugin.VSCodeWorkspaces.csproj | 8 ------- ...PowerToys.Run.Plugin.ValueGenerator.csproj | 11 --------- ...nity.PowerToys.Run.Plugin.WebSearch.csproj | 11 --------- .../Microsoft.Plugin.Folder.csproj | 8 ------- .../Microsoft.Plugin.Indexer.csproj | 20 ---------------- .../Microsoft.Plugin.Program.csproj | 11 --------- .../Microsoft.Plugin.Shell.csproj | 11 --------- .../Microsoft.Plugin.Uri.csproj | 11 --------- .../Microsoft.Plugin.WindowWalker.csproj | 11 --------- ...oft.PowerToys.Run.Plugin.Calculator.csproj | 8 ------- ...rosoft.PowerToys.Run.Plugin.History.csproj | 24 ------------------- ...rosoft.PowerToys.Run.Plugin.OneNote.csproj | 8 ------- ...soft.PowerToys.Run.Plugin.PowerToys.csproj | 11 --------- ...osoft.PowerToys.Run.Plugin.Registry.csproj | 11 --------- ...rosoft.PowerToys.Run.Plugin.Service.csproj | 8 ------- ...crosoft.PowerToys.Run.Plugin.System.csproj | 11 --------- ...osoft.PowerToys.Run.Plugin.TimeDate.csproj | 11 --------- ...owerToys.Run.Plugin.WindowsSettings.csproj | 11 --------- ...owerToys.Run.Plugin.WindowsTerminal.csproj | 11 --------- .../PowerLauncher/PowerLauncher.csproj | 6 ----- .../Wox.Infrastructure.csproj | 8 ------- .../launcher/Wox.Plugin/Wox.Plugin.csproj | 8 ------- src/modules/launcher/Wox.Test/Wox.Test.csproj | 24 ------------------- .../Settings.UI.UnitTests.csproj | 8 ------- 28 files changed, 15 insertions(+), 303 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 0967532dc3..767ffa86ee 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -35,7 +35,7 @@ - + - - - + - - - - + + - + @@ -93,4 +89,4 @@ - \ No newline at end of file + diff --git a/NOTICE.md b/NOTICE.md index d4328bbfc4..bdd5b0cbfa 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1327,7 +1327,7 @@ EXHIBIT A -Mozilla Public License. - Microsoft.Toolkit.Uwp.Notifications 7.1.2 - Microsoft.Web.WebView2 1.0.2739.15 - Microsoft.Win32.SystemEvents 8.0.0 -- Microsoft.Windows.Compatibility 8.0.7 +- Microsoft.Windows.Compatibility 8.0.10 - Microsoft.Windows.CsWin32 0.2.46-beta - Microsoft.Windows.CsWinRT 2.1.1 - Microsoft.Windows.SDK.BuildTools 10.0.22621.2428 @@ -1347,21 +1347,19 @@ EXHIBIT A -Mozilla Public License. - System.CodeDom 8.0.0 - System.CommandLine 2.0.0-beta4.22272.1 - System.ComponentModel.Composition 8.0.0 -- System.Configuration.ConfigurationManager 8.0.0 -- System.Data.OleDb 8.0.0 +- System.Configuration.ConfigurationManager 8.0.1 +- System.Data.OleDb 8.0.1 - System.Data.SqlClient 4.8.6 -- System.Diagnostics.EventLog 8.0.0 -- System.Diagnostics.PerformanceCounter 8.0.0 +- System.Diagnostics.EventLog 8.0.1 - System.Drawing.Common 8.0.6 - System.IO.Abstractions 17.2.3 - System.IO.Abstractions.TestingHelpers 17.2.3 - System.Management 8.0.0 - System.Reactive 6.0.1 -- System.Runtime.Caching 8.0.0 -- System.Security.Cryptography.ProtectedData 8.0.0 -- System.ServiceProcess.ServiceController 8.0.0 +- System.Runtime.Caching 8.0.1 +- System.ServiceProcess.ServiceController 8.0.1 - System.Text.Encoding.CodePages 8.0.0 -- System.Text.Json 8.0.4 +- System.Text.Json 8.0.5 - UnicodeInformation 2.6.0 - UnitsNet 5.56.0 - UTF.Unknown 2.5.1 diff --git a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj index 9032f1ffc0..8d332f9ea5 100644 --- a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj +++ b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj @@ -20,10 +20,6 @@ runtime - - - runtime - diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Community.PowerToys.Run.Plugin.UnitConverter.csproj b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Community.PowerToys.Run.Plugin.UnitConverter.csproj index 9e2f9e1c36..8bfd37e7a8 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Community.PowerToys.Run.Plugin.UnitConverter.csproj +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Community.PowerToys.Run.Plugin.UnitConverter.csproj @@ -32,14 +32,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Community.PowerToys.Run.Plugin.VSCodeWorkspaces.csproj b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Community.PowerToys.Run.Plugin.VSCodeWorkspaces.csproj index c61a0554ca..f482308c42 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Community.PowerToys.Run.Plugin.VSCodeWorkspaces.csproj +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Community.PowerToys.Run.Plugin.VSCodeWorkspaces.csproj @@ -28,14 +28,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Community.PowerToys.Run.Plugin.ValueGenerator.csproj b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Community.PowerToys.Run.Plugin.ValueGenerator.csproj index 9db52b8c9f..31ba1ce1e8 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Community.PowerToys.Run.Plugin.ValueGenerator.csproj +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Community.PowerToys.Run.Plugin.ValueGenerator.csproj @@ -23,17 +23,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Community.PowerToys.Run.Plugin.WebSearch.csproj b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Community.PowerToys.Run.Plugin.WebSearch.csproj index dc62d6f283..623ea68075 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Community.PowerToys.Run.Plugin.WebSearch.csproj +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Community.PowerToys.Run.Plugin.WebSearch.csproj @@ -24,17 +24,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj index 0461e44c9f..9207e9dd56 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj @@ -41,14 +41,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Microsoft.Plugin.Indexer.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Microsoft.Plugin.Indexer.csproj index af67ad5ef7..da46792746 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Microsoft.Plugin.Indexer.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Microsoft.Plugin.Indexer.csproj @@ -17,26 +17,6 @@ - - - runtime - - - - runtime - - - - runtime - - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Microsoft.Plugin.Program.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Microsoft.Plugin.Program.csproj index 17e802bd5a..bf0034286f 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Microsoft.Plugin.Program.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Microsoft.Plugin.Program.csproj @@ -31,17 +31,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj index 5e951fc922..8ac68f7c14 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj @@ -27,17 +27,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Microsoft.Plugin.Uri.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Microsoft.Plugin.Uri.csproj index 4dc88cfea4..876096794e 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Microsoft.Plugin.Uri.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Microsoft.Plugin.Uri.csproj @@ -24,17 +24,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Microsoft.Plugin.WindowWalker.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Microsoft.Plugin.WindowWalker.csproj index c8c249b57e..c814348273 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Microsoft.Plugin.WindowWalker.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Microsoft.Plugin.WindowWalker.csproj @@ -30,17 +30,6 @@ - - - - runtime - - - - runtime - - - True diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Microsoft.PowerToys.Run.Plugin.Calculator.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Microsoft.PowerToys.Run.Plugin.Calculator.csproj index 2545b7c3bc..9f4123d32a 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Microsoft.PowerToys.Run.Plugin.Calculator.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Microsoft.PowerToys.Run.Plugin.Calculator.csproj @@ -32,14 +32,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Microsoft.PowerToys.Run.Plugin.History.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Microsoft.PowerToys.Run.Plugin.History.csproj index 7571643e15..ae1fac1797 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Microsoft.PowerToys.Run.Plugin.History.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Microsoft.PowerToys.Run.Plugin.History.csproj @@ -39,30 +39,6 @@ runtime - - - runtime - - - - runtime - - - - runtime - - - - runtime - - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.OneNote/Microsoft.PowerToys.Run.Plugin.OneNote.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.OneNote/Microsoft.PowerToys.Run.Plugin.OneNote.csproj index 8cf3825c6a..4cc88d06e6 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.OneNote/Microsoft.PowerToys.Run.Plugin.OneNote.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.OneNote/Microsoft.PowerToys.Run.Plugin.OneNote.csproj @@ -41,14 +41,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj index 6ef6bb4899..d31dab3b80 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj @@ -31,17 +31,6 @@ - - - - runtime - - - - runtime - - - True diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Microsoft.PowerToys.Run.Plugin.Registry.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Microsoft.PowerToys.Run.Plugin.Registry.csproj index 08bc952a0c..fba2adb1c8 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Microsoft.PowerToys.Run.Plugin.Registry.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Microsoft.PowerToys.Run.Plugin.Registry.csproj @@ -22,17 +22,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Service/Microsoft.PowerToys.Run.Plugin.Service.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Service/Microsoft.PowerToys.Run.Plugin.Service.csproj index b3570eb53f..15a60dca21 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Service/Microsoft.PowerToys.Run.Plugin.Service.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Service/Microsoft.PowerToys.Run.Plugin.Service.csproj @@ -20,14 +20,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Microsoft.PowerToys.Run.Plugin.System.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Microsoft.PowerToys.Run.Plugin.System.csproj index 186dd449f8..e868337841 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Microsoft.PowerToys.Run.Plugin.System.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Microsoft.PowerToys.Run.Plugin.System.csproj @@ -20,17 +20,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Microsoft.PowerToys.Run.Plugin.TimeDate.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Microsoft.PowerToys.Run.Plugin.TimeDate.csproj index 886b0f7cce..4236156764 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Microsoft.PowerToys.Run.Plugin.TimeDate.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Microsoft.PowerToys.Run.Plugin.TimeDate.csproj @@ -20,17 +20,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Microsoft.PowerToys.Run.Plugin.WindowsSettings.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Microsoft.PowerToys.Run.Plugin.WindowsSettings.csproj index ba25563be6..9e7d5d6d2a 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Microsoft.PowerToys.Run.Plugin.WindowsSettings.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Microsoft.PowerToys.Run.Plugin.WindowsSettings.csproj @@ -29,17 +29,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Microsoft.PowerToys.Run.Plugin.WindowsTerminal.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Microsoft.PowerToys.Run.Plugin.WindowsTerminal.csproj index af3fed4e68..25c35fceaa 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Microsoft.PowerToys.Run.Plugin.WindowsTerminal.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Microsoft.PowerToys.Run.Plugin.WindowsTerminal.csproj @@ -17,17 +17,6 @@ - - - - runtime - - - - runtime - - - PreserveNewest diff --git a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj index 3f18eafe12..b093bbc575 100644 --- a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj +++ b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj @@ -59,14 +59,8 @@ - - - - - runtime - diff --git a/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj b/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj index e4496cd3a6..6490b7cee5 100644 --- a/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -33,14 +33,6 @@ - - - runtime - - - - runtime - runtime diff --git a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj index 16b906f634..e9179e6ddf 100644 --- a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj +++ b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj @@ -33,14 +33,6 @@ - - - runtime - - - - runtime - diff --git a/src/modules/launcher/Wox.Test/Wox.Test.csproj b/src/modules/launcher/Wox.Test/Wox.Test.csproj index c50c1b2ee4..788ade0136 100644 --- a/src/modules/launcher/Wox.Test/Wox.Test.csproj +++ b/src/modules/launcher/Wox.Test/Wox.Test.csproj @@ -31,33 +31,9 @@ - - - runtime - - - - runtime - - - - runtime - - - - runtime - - - - runtime - runtime - - - runtime - diff --git a/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj b/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj index 950cced18b..d3709d8fca 100644 --- a/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj +++ b/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj @@ -16,14 +16,6 @@ - - - runtime - - - - runtime - From d3869942c38ac80acc6069877f03668f28f0eb1d Mon Sep 17 00:00:00 2001 From: 8LWXpg <105704427+8LWXpg@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:18:49 +0800 Subject: [PATCH 23/54] [PTRun][Docs] Add HackMD to Third-Party plugins (#35275) Update thirdPartyRunPlugins.md --- doc/thirdPartyRunPlugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/thirdPartyRunPlugins.md b/doc/thirdPartyRunPlugins.md index 4db22a1c7e..4f58b1bea5 100644 --- a/doc/thirdPartyRunPlugins.md +++ b/doc/thirdPartyRunPlugins.md @@ -56,3 +56,4 @@ Below are community created plugins that target a website or software. They are | [Scoop](https://github.com/Quriz/PowerToysRunScoop) | [Quriz](https://github.com/Quriz) | Search and install packages from Scoop | | [Spotify](https://github.com/waaverecords/PowerToys-Run-Spotify) | [waaverecords](https://github.com/waaverecords) | Search Spotify and control its player | | [PowerSearch for 1Password](https://github.com/KairuDeibisu/PowerToysRunPlugin1Password) | [KairuDeibisu](https://github.com/KairuDeibisu) | An unofficial plugin for searching 1Password for usernames and passwords | +| [HackMD](https://github.com/8LWXpg/PowerToysRun-HackMD) | [8LWXpg](https://github.com/8LWXpg) | Open HackMD notes | From ca1b0acbc98bdbe3b2756c332e00a94d5245b024 Mon Sep 17 00:00:00 2001 From: gokcekantarci <115616017+gokcekantarci@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:51:02 +0300 Subject: [PATCH 24/54] [Deps]Upgrade WpfUI to 3.0.5 --- Directory.Packages.props | 2 +- NOTICE.md | 2 +- .../colorPicker/ColorPickerUI/Views/ColorEditorView.xaml | 2 ++ src/modules/launcher/PowerLauncher/MainWindow.xaml | 3 ++- src/modules/launcher/PowerLauncher/ResultList.xaml | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 767ffa86ee..d4b27080d5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -82,7 +82,7 @@ - + diff --git a/NOTICE.md b/NOTICE.md index bdd5b0cbfa..ddc6de142e 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1364,4 +1364,4 @@ EXHIBIT A -Mozilla Public License. - UnitsNet 5.56.0 - UTF.Unknown 2.5.1 - WinUIEx 2.2.0 -- WPF-UI 3.0.0 +- WPF-UI 3.0.5 diff --git a/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml b/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml index 269805aec9..d63f83a40b 100644 --- a/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml +++ b/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml @@ -46,6 +46,8 @@ VerticalAlignment="Top" VerticalContentAlignment="Top" AutomationProperties.Name="{x:Static p:Resources.Color_History}" + Background="Transparent" + BorderBrush="Transparent" ItemsSource="{Binding ColorsHistory}" KeyboardNavigation.DirectionalNavigation="Contained" MouseWheel="HistoryColors_OnMouseWheelScroll" diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml b/src/modules/launcher/PowerLauncher/MainWindow.xaml index 764dee2bba..30acc5c3c0 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml @@ -72,9 +72,10 @@ x:Name="pluginsHintsList" Grid.Row="1" Margin="16,0,0,0" - Padding="0,0,32,0" ItemContainerStyle="{StaticResource PluginsListViewItemStyle}" ItemsSource="{Binding Plugins}" + Background="Transparent" + BorderBrush="Transparent" PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" diff --git a/src/modules/launcher/PowerLauncher/ResultList.xaml b/src/modules/launcher/PowerLauncher/ResultList.xaml index 7eda85a709..7e387e9807 100644 --- a/src/modules/launcher/PowerLauncher/ResultList.xaml +++ b/src/modules/launcher/PowerLauncher/ResultList.xaml @@ -32,6 +32,8 @@ Date: Fri, 11 Oct 2024 09:35:13 -0400 Subject: [PATCH 25/54] [Deps] WinAppSDK 1.6.1 and CsWinRT 2.1.5 update (#35381) * [Deps] Update CsWinRT to 2.1.5 * [Deps] Update WinAppSDK to 1.6.1 * [Props] Updated WindowsSdkPackageVersion to 22621.48 in Common.Dotnet.CsWinRT.props * Updated NOTICE.md * [Peek] Resolve ambiguity with Color struct --- Directory.Packages.props | 4 ++-- NOTICE.md | 4 ++-- src/Common.Dotnet.CsWinRT.props | 2 +- .../MeasureToolCore/PowerToys.MeasureToolCore.vcxproj | 8 ++++---- src/modules/MeasureTool/MeasureToolCore/packages.config | 2 +- .../Peek.FilePreviewer/Controls/BrowserControl.xaml.cs | 2 +- .../powerrename/PowerRenameUILib/PowerRenameUI.vcxproj | 8 ++++---- src/modules/powerrename/PowerRenameUILib/packages.config | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d4b27080d5..e0797a6270 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -42,9 +42,9 @@ TODO: in Common.Dotnet.CsWinRT.props, on upgrade, verify RemoveCsWinRTPackageAnalyzer is no longer needed. This is present due to a bug in CsWinRT where WPF projects cause the analyzer to fail. --> - + - + diff --git a/NOTICE.md b/NOTICE.md index ddc6de142e..a8059397e5 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1329,9 +1329,9 @@ EXHIBIT A -Mozilla Public License. - Microsoft.Win32.SystemEvents 8.0.0 - Microsoft.Windows.Compatibility 8.0.10 - Microsoft.Windows.CsWin32 0.2.46-beta -- Microsoft.Windows.CsWinRT 2.1.1 +- Microsoft.Windows.CsWinRT 2.1.5 - Microsoft.Windows.SDK.BuildTools 10.0.22621.2428 -- Microsoft.WindowsAppSDK 1.6.240829007 +- Microsoft.WindowsAppSDK 1.6.240923002 - Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9 - Microsoft.Xaml.Behaviors.Wpf 1.1.39 - ModernWpfUI 0.9.4 diff --git a/src/Common.Dotnet.CsWinRT.props b/src/Common.Dotnet.CsWinRT.props index 514997e71b..1669cba196 100644 --- a/src/Common.Dotnet.CsWinRT.props +++ b/src/Common.Dotnet.CsWinRT.props @@ -2,7 +2,7 @@ - 10.0.22621.38 + 10.0.22621.48 net8.0-windows10.0.22621.0 10.0.19041.0 10.0.19041.0 diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj index 444657646e..b05546d9aa 100644 --- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj +++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj @@ -1,6 +1,6 @@  - + @@ -137,8 +137,8 @@ - + @@ -149,8 +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 7043c92ee0..ed165ac47c 100644 --- a/src/modules/MeasureTool/MeasureToolCore/packages.config +++ b/src/modules/MeasureTool/MeasureToolCore/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/src/modules/peek/Peek.FilePreviewer/Controls/BrowserControl.xaml.cs b/src/modules/peek/Peek.FilePreviewer/Controls/BrowserControl.xaml.cs index 1f1f6f9fbe..eda90df8f9 100644 --- a/src/modules/peek/Peek.FilePreviewer/Controls/BrowserControl.xaml.cs +++ b/src/modules/peek/Peek.FilePreviewer/Controls/BrowserControl.xaml.cs @@ -164,7 +164,7 @@ namespace Peek.FilePreviewer.Controls if (!_originalBackgroundColor.HasValue) { // HACK: We used to store PreviewBrowser.DefaultBackgroundColor here, but WebView started returning transparent when running without a debugger attached. We want html files to be seen as in the browser, which has white as a default background color. - _originalBackgroundColor = Colors.White; + _originalBackgroundColor = Microsoft.UI.Colors.White; } // Setting the background color to transparent when initially loading the WebView2 component. diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj index fc9bd9b1f6..192a1528bd 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj @@ -1,6 +1,6 @@  - + @@ -205,8 +205,8 @@ - + @@ -219,9 +219,9 @@ - - + + diff --git a/src/modules/powerrename/PowerRenameUILib/packages.config b/src/modules/powerrename/PowerRenameUILib/packages.config index 360805a64d..1ff9b46877 100644 --- a/src/modules/powerrename/PowerRenameUILib/packages.config +++ b/src/modules/powerrename/PowerRenameUILib/packages.config @@ -6,5 +6,5 @@ - + \ No newline at end of file From 3a228cc46e0d6ee0001351876e2622133b86d260 Mon Sep 17 00:00:00 2001 From: gokcekantarci <115616017+gokcekantarci@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:51:22 +0300 Subject: [PATCH 26/54] [PTRun]Fix CultureNotFoundException Handling (#35256) --- .../PowerLauncher/ViewModel/MainViewModel.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs index 809c660cd1..5d6c55b46d 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs @@ -1197,9 +1197,17 @@ namespace PowerLauncher.ViewModel public static FlowDirection GetLanguageFlowDirection() { - bool isCurrentLanguageRightToLeft = System.Windows.Input.InputLanguageManager.Current.CurrentInputLanguage.TextInfo.IsRightToLeft; + try + { + bool isCurrentLanguageRightToLeft = System.Windows.Input.InputLanguageManager.Current.CurrentInputLanguage.TextInfo.IsRightToLeft; - return isCurrentLanguageRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight; + return isCurrentLanguageRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight; + } + catch (CultureNotFoundException ex) + { + Log.Exception($"CultureNotFoundException: {ex.Message}", ex, MethodBase.GetCurrentMethod().DeclaringType); + return FlowDirection.LeftToRight; // default FlowDirection.LeftToRight + } } protected virtual void Dispose(bool disposing) From 1d352c686aa9bbbfa6fdfc8b8f322d6a4613a9a2 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 11 Oct 2024 11:40:36 -0700 Subject: [PATCH 27/54] removing dup entry in spelling (#35379) Update expect.txt --- .github/actions/spell-check/expect.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 8ff275bc95..83689c8071 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -32,7 +32,6 @@ AFFINETRANSFORM AFX AGGREGATABLE AHybrid -AKV akv ALarger ALLAPPS From 89ec5be5ba717e44981d2f788b70b0ff37974388 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 11 Oct 2024 11:56:55 -0700 Subject: [PATCH 28/54] Removing Markdown exclude (#35380) Update ci.yml --- .pipelines/v2/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.pipelines/v2/ci.yml b/.pipelines/v2/ci.yml index 5e7bf26676..a68de324ee 100644 --- a/.pipelines/v2/ci.yml +++ b/.pipelines/v2/ci.yml @@ -4,22 +4,22 @@ trigger: include: - main - stable - paths: - exclude: - - doc/* - - temp/* - - tools/* - - '**.md' +# paths: +# exclude: +# - doc/* +# - temp/* +# - tools/* +# - '**.md' pr: branches: include: - main - stable - paths: - exclude: - - '**.md' - - doc +# paths: +# exclude: +# - '**.md' +# - doc name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr) From 9994fd771515e6e5ff1ce22299c8e816cd9df27c Mon Sep 17 00:00:00 2001 From: Seraphima Zykova Date: Mon, 14 Oct 2024 16:51:02 +0300 Subject: [PATCH 29/54] [Workspaces] Sequential launch (#35297) --- .../WorkspacesEditor/Data/ProjectData.cs | 2 + .../WorkspacesEditor/Models/Application.cs | 3 + .../WorkspacesEditor/Models/Project.cs | 1 + .../Utils/WorkspacesEditorIO.cs | 1 + .../WorkspacesLauncher/AppLauncher.cpp | 47 ------- .../WorkspacesLauncher/AppLauncher.h | 4 +- .../WorkspacesLauncher/Launcher.cpp | 93 +++++++++++- .../Workspaces/WorkspacesLauncher/Launcher.h | 18 ++- .../WorkspacesLauncher/LauncherUIHelper.cpp | 4 +- .../WorkspacesLauncher/LauncherUIHelper.h | 2 +- .../WindowArrangerHelper.cpp | 5 + .../WorkspacesLauncher/WindowArrangerHelper.h | 1 + .../Workspaces/WorkspacesLauncher/main.cpp | 32 +++++ .../WorkspacesLauncherUI/App.xaml.cs | 8 ++ .../Data/LaunchingState.cs | 1 + .../ViewModels/MainViewModel.cs | 12 +- .../Workspaces/WorkspacesLib/AppUtils.cpp | 37 +++++ .../Workspaces/WorkspacesLib/AppUtils.h | 5 + .../WorkspacesLib/LaunchingStateEnum.h | 3 +- .../WorkspacesLib/LaunchingStatus.cpp | 133 ++++++++++++++---- .../WorkspacesLib/LaunchingStatus.h | 14 +- .../WorkspacesLib/WorkspacesData.cpp | 9 ++ .../Workspaces/WorkspacesLib/WorkspacesData.h | 1 + .../WindowArranger.cpp | 126 +++++++++++------ .../WorkspacesWindowArranger/WindowArranger.h | 10 +- .../WorkspacesWindowArranger/main.cpp | 5 +- 26 files changed, 419 insertions(+), 158 deletions(-) diff --git a/src/modules/Workspaces/WorkspacesEditor/Data/ProjectData.cs b/src/modules/Workspaces/WorkspacesEditor/Data/ProjectData.cs index 281ac67abc..7eb0a63831 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Data/ProjectData.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Data/ProjectData.cs @@ -25,6 +25,8 @@ namespace WorkspacesEditor.Data public int Height { get; set; } } + public string Id { get; set; } + public string Application { get; set; } public string ApplicationPath { get; set; } diff --git a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs index c31087c20c..294d59854d 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs @@ -31,6 +31,7 @@ namespace WorkspacesEditor.Models public Application(Application other) { + Id = other.Id; AppName = other.AppName; AppPath = other.AppPath; AppTitle = other.AppTitle; @@ -95,6 +96,8 @@ namespace WorkspacesEditor.Models } } + public string Id { get; set; } + public string AppName { get; set; } public string AppPath { get; set; } diff --git a/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs b/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs index a9a6f407ba..07d7ad40a1 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs @@ -251,6 +251,7 @@ namespace WorkspacesEditor.Models { Models.Application newApp = new Models.Application() { + Id = app.Id != null ? app.Id : $"{{{Guid.NewGuid().ToString()}}}", AppName = app.Application, AppPath = app.ApplicationPath, AppTitle = app.Title, diff --git a/src/modules/Workspaces/WorkspacesEditor/Utils/WorkspacesEditorIO.cs b/src/modules/Workspaces/WorkspacesEditor/Utils/WorkspacesEditorIO.cs index da128f2ee4..a3a4bc418d 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Utils/WorkspacesEditorIO.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Utils/WorkspacesEditorIO.cs @@ -97,6 +97,7 @@ namespace WorkspacesEditor.Utils { wrapper.Applications.Add(new ProjectData.ApplicationWrapper { + Id = app.Id, Application = app.AppName, ApplicationPath = app.AppPath, Title = app.AppTitle, diff --git a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp index f9aed31fe6..3c58c267f9 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp @@ -10,8 +10,6 @@ #include -#include - #include using namespace winrt; @@ -20,26 +18,6 @@ using namespace Windows::Management::Deployment; namespace AppLauncher { - void UpdatePackagedApps(std::vector& apps, const Utils::Apps::AppList& installedApps) - { - for (auto& app : apps) - { - // Packaged apps have version in the path, it will be outdated after update. - // We need make sure the current package is up to date. - if (!app.packageFullName.empty()) - { - auto installedApp = std::find_if(installedApps.begin(), installedApps.end(), [&](const Utils::Apps::AppData& val) { return val.name == app.name; }); - if (installedApp != installedApps.end() && app.packageFullName != installedApp->packageFullName) - { - std::wstring exeFileName = app.path.substr(app.path.find_last_of(L"\\") + 1); - app.packageFullName = installedApp->packageFullName; - app.path = installedApp->installPath + L"\\" + exeFileName; - Logger::trace(L"Updated package full name for {}: {}", app.name, app.packageFullName); - } - } - } - } - Result LaunchApp(const std::wstring& appPath, const std::wstring& commandLineArgs, bool elevated) { std::wstring dir = std::filesystem::path(appPath).parent_path(); @@ -181,29 +159,4 @@ namespace AppLauncher Logger::trace(L"{} {} at {}", app.name, (launched ? L"launched" : L"not launched"), app.path); return launched; } - - bool Launch(WorkspacesData::WorkspacesProject& project, LaunchingStatus& launchingStatus, ErrorList& launchErrors) - { - bool launchedSuccessfully{ true }; - - auto installedApps = Utils::Apps::GetAppsList(); - UpdatePackagedApps(project.apps, installedApps); - - // Launch apps - for (auto& app : project.apps) - { - if (!Launch(app, launchErrors)) - { - Logger::error(L"Failed to launch {}", app.name); - launchingStatus.Update(app, LaunchingState::Failed); - launchedSuccessfully = false; - } - else - { - launchingStatus.Update(app, LaunchingState::Launched); - } - } - - return launchedSuccessfully; - } } \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.h b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.h index 0827afc4c9..99ddeab6c8 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.h +++ b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.h @@ -2,6 +2,7 @@ #include +#include #include #include #include @@ -10,7 +11,6 @@ namespace AppLauncher { using ErrorList = std::vector>; + bool Launch(const WorkspacesData::WorkspacesProject::Application& app, ErrorList& launchErrors); Result LaunchApp(const std::wstring& appPath, const std::wstring& commandLineArgs, bool elevated); - - bool Launch(WorkspacesData::WorkspacesProject& project, LaunchingStatus& launchingStatus, ErrorList& launchErrors); } diff --git a/src/modules/Workspaces/WorkspacesLauncher/Launcher.cpp b/src/modules/Workspaces/WorkspacesLauncher/Launcher.cpp index b660d0d939..6483c8f477 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/Launcher.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/Launcher.cpp @@ -8,6 +8,7 @@ #include #include +#include Launcher::Launcher(const WorkspacesData::WorkspacesProject& project, std::vector& workspaces, @@ -16,10 +17,13 @@ Launcher::Launcher(const WorkspacesData::WorkspacesProject& project, m_workspaces(workspaces), m_invokePoint(invokePoint), m_start(std::chrono::high_resolution_clock::now()), - m_uiHelper(std::make_unique()), + m_uiHelper(std::make_unique(std::bind(&Launcher::handleUIMessage, this, std::placeholders::_1))), m_windowArrangerHelper(std::make_unique(std::bind(&Launcher::handleWindowArrangerMessage, this, std::placeholders::_1))), - m_launchingStatus(m_project, std::bind(&LauncherUIHelper::UpdateLaunchStatus, m_uiHelper.get(), std::placeholders::_1)) + m_launchingStatus(m_project) { + // main thread + Logger::info(L"Launch Workspace {} : {}", m_project.name, m_project.id); + m_uiHelper->LaunchUI(); m_uiHelper->UpdateLaunchStatus(m_launchingStatus.Get()); @@ -48,6 +52,7 @@ Launcher::Launcher(const WorkspacesData::WorkspacesProject& project, Launcher::~Launcher() { + // main thread, will wait until arranger is finished Logger::trace(L"Finalizing launch"); // update last-launched time @@ -86,20 +91,81 @@ Launcher::~Launcher() } } + std::lock_guard lock(m_launchErrorsMutex); Trace::Workspaces::Launch(m_launchedSuccessfully, m_project, m_invokePoint, duration.count(), differentSetup, m_launchErrors); } -void Launcher::Launch() +void Launcher::Launch() // Launching thread { - Logger::info(L"Launch Workspace {} : {}", m_project.name, m_project.id); - m_launchedSuccessfully = AppLauncher::Launch(m_project, m_launchingStatus, m_launchErrors); + const long maxWaitTimeMs = 3000; + const long ms = 100; + + // Launch apps + for (auto appState = m_launchingStatus.GetNext(LaunchingState::Waiting); appState.has_value(); appState = m_launchingStatus.GetNext(LaunchingState::Waiting)) + { + auto app = appState.value().application; + + long waitingTime = 0; + bool additionalWait = false; + while (!m_launchingStatus.AllInstancesOfTheAppLaunchedAndMoved(app) && waitingTime < maxWaitTimeMs) + { + std::this_thread::sleep_for(std::chrono::milliseconds(ms)); + waitingTime += ms; + additionalWait = true; + } + + if (additionalWait) + { + // Resolves an issue when Outlook does not launch when launching one after another. + // Launching Outlook instances right one after another causes error message. + // Launching Outlook instances with less than 1-second delay causes the second window not to appear + // even though there wasn't a launch error. + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + } + + if (waitingTime >= maxWaitTimeMs) + { + Logger::info(L"Waiting time for launching next {} instance expired", app.name); + } + + bool launched{ false }; + { + std::lock_guard lock(m_launchErrorsMutex); + launched = AppLauncher::Launch(app, m_launchErrors); + } + + if (launched) + { + m_launchingStatus.Update(app, LaunchingState::Launched); + } + else + { + Logger::error(L"Failed to launch {}", app.name); + m_launchingStatus.Update(app, LaunchingState::Failed); + m_launchedSuccessfully = false; + } + + auto status = m_launchingStatus.Get(app); // updated after launch status + if (status.has_value()) + { + { + std::lock_guard lock(m_windowArrangerHelperMutex); + m_windowArrangerHelper->UpdateLaunchStatus(status.value()); + } + } + + { + std::lock_guard lock(m_uiHelperMutex); + m_uiHelper->UpdateLaunchStatus(m_launchingStatus.Get()); + } + } } -void Launcher::handleWindowArrangerMessage(const std::wstring& msg) +void Launcher::handleWindowArrangerMessage(const std::wstring& msg) // WorkspacesArranger IPC thread { if (msg == L"ready") { - Launch(); + std::thread([&]() { Launch(); }).detach(); } else { @@ -109,6 +175,11 @@ void Launcher::handleWindowArrangerMessage(const std::wstring& msg) if (data.has_value()) { m_launchingStatus.Update(data.value().application, data.value().state); + + { + std::lock_guard lock(m_uiHelperMutex); + m_uiHelper->UpdateLaunchStatus(m_launchingStatus.Get()); + } } else { @@ -121,3 +192,11 @@ void Launcher::handleWindowArrangerMessage(const std::wstring& msg) } } } + +void Launcher::handleUIMessage(const std::wstring& msg) // UI IPC thread +{ + if (msg == L"cancel") + { + m_launchingStatus.Cancel(); + } +} diff --git a/src/modules/Workspaces/WorkspacesLauncher/Launcher.h b/src/modules/Workspaces/WorkspacesLauncher/Launcher.h index 36f17329d2..9811be25c5 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/Launcher.h +++ b/src/modules/Workspaces/WorkspacesLauncher/Launcher.h @@ -14,18 +14,24 @@ public: Launcher(const WorkspacesData::WorkspacesProject& project, std::vector& workspaces, InvokePoint invokePoint); ~Launcher(); - void Launch(); - private: WorkspacesData::WorkspacesProject m_project; std::vector& m_workspaces; const InvokePoint m_invokePoint; const std::chrono::steady_clock::time_point m_start; - std::unique_ptr m_uiHelper; - std::unique_ptr m_windowArrangerHelper; + std::atomic m_launchedSuccessfully{}; LaunchingStatus m_launchingStatus; - bool m_launchedSuccessfully{}; - std::vector> m_launchErrors{}; + std::unique_ptr m_uiHelper; + std::mutex m_uiHelperMutex; + + std::unique_ptr m_windowArrangerHelper; + std::mutex m_windowArrangerHelperMutex; + + std::vector> m_launchErrors{}; + std::mutex m_launchErrorsMutex; + + void Launch(); void handleWindowArrangerMessage(const std::wstring& msg); + void handleUIMessage(const std::wstring& msg); }; diff --git a/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.cpp b/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.cpp index b35c6d3657..8bcccaec91 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.cpp @@ -9,9 +9,9 @@ #include -LauncherUIHelper::LauncherUIHelper() : +LauncherUIHelper::LauncherUIHelper(std::function ipcCallback) : m_processId{}, - m_ipcHelper(IPCHelperStrings::LauncherUIPipeName, IPCHelperStrings::UIPipeName, nullptr) + m_ipcHelper(IPCHelperStrings::LauncherUIPipeName, IPCHelperStrings::UIPipeName, ipcCallback) { } diff --git a/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.h b/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.h index 20704f13a2..bb43543e3f 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.h +++ b/src/modules/Workspaces/WorkspacesLauncher/LauncherUIHelper.h @@ -6,7 +6,7 @@ class LauncherUIHelper { public: - LauncherUIHelper(); + LauncherUIHelper(std::function ipcCallback); ~LauncherUIHelper(); void LaunchUI(); diff --git a/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.cpp b/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.cpp index 600038ea61..cb2075aba9 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.cpp @@ -69,3 +69,8 @@ void WindowArrangerHelper::Launch(const std::wstring& projectId, bool elevated, Logger::error(L"Failed to launch PowerToys.WorkspacesWindowArranger: {}", res.error()); } } + +void WindowArrangerHelper::UpdateLaunchStatus(const WorkspacesData::LaunchingAppState& appState) const +{ + m_ipcHelper.send(WorkspacesData::AppLaunchInfoJSON::ToJson({ appState.application, nullptr, appState.state }).ToString().c_str()); +} diff --git a/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.h b/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.h index 22d7e3ea1c..8e0ee5d473 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.h +++ b/src/modules/Workspaces/WorkspacesLauncher/WindowArrangerHelper.h @@ -12,6 +12,7 @@ public: ~WindowArrangerHelper(); void Launch(const std::wstring& projectId, bool elevated, std::function keepWaitingCallback); + void UpdateLaunchStatus(const WorkspacesData::LaunchingAppState& appState) const; private: DWORD m_processId; diff --git a/src/modules/Workspaces/WorkspacesLauncher/main.cpp b/src/modules/Workspaces/WorkspacesLauncher/main.cpp index 9f3d151097..3e7c8c7db1 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/main.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/main.cpp @@ -13,6 +13,7 @@ #include #include +#include const std::wstring moduleName = L"Workspaces\\WorkspacesLauncher"; const std::wstring internalPath = L""; @@ -161,6 +162,37 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm return 1; } + // prepare project in advance + auto installedApps = Utils::Apps::GetAppsList(); + bool updatedApps = Utils::Apps::UpdateWorkspacesApps(projectToLaunch, installedApps); + bool updatedIds = false; + + // verify apps have ids + for (auto& app : projectToLaunch.apps) + { + if (app.id.empty()) + { + app.id = CreateGuidString(); + updatedIds = true; + } + } + + // update the file before launching, so WorkspacesWindowArranger and WorkspacesLauncherUI could get updated app paths + if (updatedApps || updatedIds) + { + for (int i = 0; i < workspaces.size(); i++) + { + if (workspaces[i].id == projectToLaunch.id) + { + workspaces[i] = projectToLaunch; + break; + } + } + + json::to_file(WorkspacesData::WorkspacesFile(), WorkspacesData::WorkspacesListJSON::ToJson(workspaces)); + } + + // launch Launcher launcher(projectToLaunch, workspaces, cmdArgs.invokePoint); Logger::trace("Finished"); diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs b/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs index a065918523..64686fc139 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs @@ -37,6 +37,14 @@ namespace WorkspacesLauncherUI { } + public static void SendIPCMessage(string message) + { + if (ipcmanager != null) + { + ipcmanager.Send(message); + } + } + private void OnStartup(object sender, StartupEventArgs e) { Logger.InitializeLogger("\\Workspaces\\WorkspacesLauncherUI"); diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/Data/LaunchingState.cs b/src/modules/Workspaces/WorkspacesLauncherUI/Data/LaunchingState.cs index 9ad8c958d2..67cd951b8b 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/Data/LaunchingState.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/Data/LaunchingState.cs @@ -11,5 +11,6 @@ namespace WorkspacesLauncherUI.Data Launched, LaunchedAndMoved, Failed, + Canceled, } } diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs index ed6cdd8f31..7002c9ef05 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs @@ -19,7 +19,6 @@ namespace WorkspacesLauncherUI.ViewModels private StatusWindow _snapshotWindow; private int launcherProcessID; - private bool _exiting; public event PropertyChangedEventHandler PropertyChanged; @@ -30,8 +29,6 @@ namespace WorkspacesLauncherUI.ViewModels public MainViewModel() { - _exiting = false; - // receive IPC Message App.IPCMessageReceivedCallback = (string msg) => { @@ -50,11 +47,6 @@ namespace WorkspacesLauncherUI.ViewModels private void HandleAppLaunchingState(AppLaunchData.AppLaunchDataWrapper appLaunchData) { - if (_exiting) - { - return; - } - launcherProcessID = appLaunchData.LauncherProcessID; List appLaunchingList = new List(); foreach (var app in appLaunchData.AppLaunchInfos.AppLaunchInfoList) @@ -90,9 +82,7 @@ namespace WorkspacesLauncherUI.ViewModels internal void CancelLaunch() { - _exiting = true; - Process proc = Process.GetProcessById(launcherProcessID); - proc.Kill(); + App.SendIPCMessage("cancel"); } } } diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp index 2d69d6f86f..9b65b64b29 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp @@ -341,5 +341,42 @@ namespace Utils return Utils::Apps::GetApp(processPath, pid, apps); } + + bool UpdateAppVersion(WorkspacesData::WorkspacesProject::Application& app, const AppList& installedApps) + { + auto installedApp = std::find_if(installedApps.begin(), installedApps.end(), [&](const AppData& val) { return val.name == app.name; }); + if (installedApp == installedApps.end()) + { + return false; + } + + // Packaged apps have version in the path, it will be outdated after update. + // We need make sure the current package is up to date. + if (!app.packageFullName.empty()) + { + if (app.packageFullName != installedApp->packageFullName) + { + std::wstring exeFileName = app.path.substr(app.path.find_last_of(L"\\") + 1); + app.packageFullName = installedApp->packageFullName; + app.path = installedApp->installPath + L"\\" + exeFileName; + Logger::trace(L"Updated package full name for {}: {}", app.name, app.packageFullName); + return true; + } + } + + return false; + } + + bool UpdateWorkspacesApps(WorkspacesData::WorkspacesProject& workspace, const AppList& installedApps) + { + bool updated = false; + for (auto& app : workspace.apps) + { + updated |= UpdateAppVersion(app, installedApps); + } + + return updated; + } + } } \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.h b/src/modules/Workspaces/WorkspacesLib/AppUtils.h index 596d7d0a85..80c88f2edd 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.h +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.h @@ -1,5 +1,7 @@ #pragma once +#include + namespace Utils { namespace Apps @@ -21,5 +23,8 @@ namespace Utils AppList GetAppsList(); std::optional GetApp(const std::wstring& appPath, DWORD pid, const AppList& apps); std::optional GetApp(HWND window, const AppList& apps); + + bool UpdateAppVersion(WorkspacesData::WorkspacesProject::Application& app, const AppList& installedApps); + bool UpdateWorkspacesApps(WorkspacesData::WorkspacesProject& workspace, const AppList& installedApps); } } \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLib/LaunchingStateEnum.h b/src/modules/Workspaces/WorkspacesLib/LaunchingStateEnum.h index 2fbaf2fe97..ab229a08f2 100644 --- a/src/modules/Workspaces/WorkspacesLib/LaunchingStateEnum.h +++ b/src/modules/Workspaces/WorkspacesLib/LaunchingStateEnum.h @@ -6,5 +6,6 @@ enum class LaunchingState Waiting = 0, Launched, LaunchedAndMoved, - Failed + Failed, + Canceled, }; \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.cpp b/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.cpp index 46c4bb6e3f..f41a872313 100644 --- a/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.cpp +++ b/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.cpp @@ -3,8 +3,7 @@ #include -LaunchingStatus::LaunchingStatus(const WorkspacesData::WorkspacesProject& project, std::function updateCallback) : - m_updateCallback(updateCallback) +LaunchingStatus::LaunchingStatus(const WorkspacesData::WorkspacesProject& project) { std::unique_lock lock(m_mutex); for (const auto& app : project.apps) @@ -13,26 +12,6 @@ LaunchingStatus::LaunchingStatus(const WorkspacesData::WorkspacesProject& projec } } -const WorkspacesData::LaunchingAppStateMap& LaunchingStatus::Get() noexcept -{ - std::shared_lock lock(m_mutex); - return m_appsState; -} - -bool LaunchingStatus::AllLaunchedAndMoved() noexcept -{ - std::shared_lock lock(m_mutex); - for (const auto& [app, data] : m_appsState) - { - if (data.state != LaunchingState::Failed && data.state != LaunchingState::LaunchedAndMoved) - { - return false; - } - } - - return true; -} - bool LaunchingStatus::AllLaunched() noexcept { std::shared_lock lock(m_mutex); @@ -47,6 +26,86 @@ bool LaunchingStatus::AllLaunched() noexcept return true; } +bool LaunchingStatus::AllLaunchedAndMoved() noexcept +{ + std::shared_lock lock(m_mutex); + for (const auto& [app, data] : m_appsState) + { + if (data.state != LaunchingState::Failed && + data.state != LaunchingState::Canceled && + data.state != LaunchingState::LaunchedAndMoved) + { + return false; + } + } + + return true; +} + +bool LaunchingStatus::AllInstancesOfTheAppLaunchedAndMoved(const WorkspacesData::WorkspacesProject::Application& application) noexcept +{ + std::shared_lock lock(m_mutex); + + for (const auto& [app, state] : m_appsState) + { + if (app.name == application.name || app.path == application.path) + { + if (state.state == LaunchingState::Launched) + { + return false; + } + } + } + + return true; +} + +const WorkspacesData::LaunchingAppStateMap& LaunchingStatus::Get() noexcept +{ + std::shared_lock lock(m_mutex); + return m_appsState; +} + +std::optional LaunchingStatus::Get(const WorkspacesData::WorkspacesProject::Application& app) noexcept +{ + std::shared_lock lock(m_mutex); + if (m_appsState.contains(app)) + { + return m_appsState.at(app); + } + + return std::nullopt; +} + +std::optional LaunchingStatus::GetNext(LaunchingState state) noexcept +{ + std::shared_lock lock(m_mutex); + for (const auto& [app, appState] : m_appsState) + { + if (appState.state == state) + { + return appState; + } + } + + return std::nullopt; +} + +bool LaunchingStatus::IsWindowProcessed(HWND window) noexcept +{ + std::shared_lock lock(m_mutex); + + for (const auto& [app, state] : m_appsState) + { + if (state.window == window) + { + return true; + } + } + + return false; +} + void LaunchingStatus::Update(const WorkspacesData::WorkspacesProject::Application& app, LaunchingState state) { std::unique_lock lock(m_mutex); @@ -57,9 +116,29 @@ void LaunchingStatus::Update(const WorkspacesData::WorkspacesProject::Applicatio } m_appsState[app].state = state; - - if (m_updateCallback) - { - m_updateCallback(m_appsState); - } } + +void LaunchingStatus::Update(const WorkspacesData::WorkspacesProject::Application& app, HWND window, LaunchingState state) +{ + std::unique_lock lock(m_mutex); + if (!m_appsState.contains(app)) + { + Logger::error(L"Error updating state: app {} is not tracked in the project", app.name); + return; + } + + m_appsState[app].state = state; + m_appsState[app].window = window; +} + +void LaunchingStatus::Cancel() +{ + std::unique_lock lock(m_mutex); + for (auto& [app, state] : m_appsState) + { + if (state.state == LaunchingState::Waiting) + { + state.state = LaunchingState::Canceled; + } + } +} \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.h b/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.h index eec0b1b0f6..2a0b679f08 100644 --- a/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.h +++ b/src/modules/Workspaces/WorkspacesLib/LaunchingStatus.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -8,17 +7,24 @@ class LaunchingStatus { public: - LaunchingStatus(const WorkspacesData::WorkspacesProject& project, std::function updateCallback); + LaunchingStatus(const WorkspacesData::WorkspacesProject& project); ~LaunchingStatus() = default; - bool AllLaunchedAndMoved() noexcept; bool AllLaunched() noexcept; + bool AllLaunchedAndMoved() noexcept; + bool AllInstancesOfTheAppLaunchedAndMoved(const WorkspacesData::WorkspacesProject::Application& app) noexcept; + const WorkspacesData::LaunchingAppStateMap& Get() noexcept; + std::optional Get(const WorkspacesData::WorkspacesProject::Application& app) noexcept; + std::optional GetNext(LaunchingState state) noexcept; + + bool IsWindowProcessed(HWND window) noexcept; void Update(const WorkspacesData::WorkspacesProject::Application& app, LaunchingState state); + void Update(const WorkspacesData::WorkspacesProject::Application& app, HWND window, LaunchingState state); + void Cancel(); private: WorkspacesData::LaunchingAppStateMap m_appsState; - std::function m_updateCallback; std::shared_mutex m_mutex; }; diff --git a/src/modules/Workspaces/WorkspacesLib/WorkspacesData.cpp b/src/modules/Workspaces/WorkspacesLib/WorkspacesData.cpp index d71619f90b..8a15001eac 100644 --- a/src/modules/Workspaces/WorkspacesLib/WorkspacesData.cpp +++ b/src/modules/Workspaces/WorkspacesLib/WorkspacesData.cpp @@ -3,6 +3,8 @@ #include +#include + namespace NonLocalizable { const inline wchar_t ModuleKey[] = L"Workspaces"; @@ -72,6 +74,7 @@ namespace WorkspacesData namespace NonLocalizable { + const static wchar_t* AppIdID = L"id"; const static wchar_t* AppNameID = L"application"; const static wchar_t* AppPathID = L"application-path"; const static wchar_t* AppPackageFullNameID = L"package-full-name"; @@ -89,6 +92,7 @@ namespace WorkspacesData json::JsonObject ToJson(const WorkspacesProject::Application& data) { json::JsonObject json{}; + json.SetNamedValue(NonLocalizable::AppIdID, json::value(data.id)); json.SetNamedValue(NonLocalizable::AppNameID, json::value(data.name)); json.SetNamedValue(NonLocalizable::AppPathID, json::value(data.path)); json.SetNamedValue(NonLocalizable::AppTitleID, json::value(data.title)); @@ -110,6 +114,11 @@ namespace WorkspacesData WorkspacesProject::Application result; try { + if (json.HasKey(NonLocalizable::AppIdID)) + { + result.id = json.GetNamedString(NonLocalizable::AppIdID); + } + if (json.HasKey(NonLocalizable::AppNameID)) { result.name = json.GetNamedString(NonLocalizable::AppNameID); diff --git a/src/modules/Workspaces/WorkspacesLib/WorkspacesData.h b/src/modules/Workspaces/WorkspacesLib/WorkspacesData.h index 40252850a3..d728337996 100644 --- a/src/modules/Workspaces/WorkspacesLib/WorkspacesData.h +++ b/src/modules/Workspaces/WorkspacesLib/WorkspacesData.h @@ -25,6 +25,7 @@ namespace WorkspacesData auto operator<=>(const Position&) const = default; }; + std::wstring id; std::wstring name; std::wstring title; std::wstring path; diff --git a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp index 18bd2a049f..5c176c173f 100644 --- a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp +++ b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.cpp @@ -94,45 +94,47 @@ namespace FancyZones } -WindowArranger::WindowArranger(WorkspacesData::WorkspacesProject project, const IPCHelper& ipcHelper) : +WindowArranger::WindowArranger(WorkspacesData::WorkspacesProject project) : m_project(project), m_windowsBefore(WindowEnumerator::Enumerate(WindowFilter::Filter)), m_monitors(MonitorUtils::IdentifyMonitors()), m_installedApps(Utils::Apps::GetAppsList()), //m_windowCreationHandler(std::bind(&WindowArranger::onWindowCreated, this, std::placeholders::_1)), - m_ipcHelper(ipcHelper) + m_ipcHelper(IPCHelperStrings::WindowArrangerPipeName, IPCHelperStrings::LauncherArrangerPipeName, std::bind(&WindowArranger::receiveIpcMessage, this, std::placeholders::_1)), + m_launchingStatus(m_project) { - for (auto& app : project.apps) - { - m_launchingApps.insert({ app, { app, nullptr } }); - } - m_ipcHelper.send(L"ready"); - for (int attempt = 0; attempt < 50 && !allWindowsFound(); attempt++) - { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); + const long maxLaunchingWaitingTime = 10000, maxRepositionWaitingTime = 3000, ms = 300; + long waitingTime{ 0 }; - std::vector windowsAfter = WindowEnumerator::Enumerate(WindowFilter::Filter); - std::vector windowsDiff{}; - std::copy_if(windowsAfter.begin(), windowsAfter.end(), std::back_inserter(windowsDiff), [&](HWND window) { return std::find(m_windowsBefore.begin(), m_windowsBefore.end(), window) == m_windowsBefore.end(); }); - - for (HWND window : windowsDiff) - { - processWindow(window); - } + // process launching windows + while (!m_launchingStatus.AllLaunched() && waitingTime < maxLaunchingWaitingTime) + { + processWindows(false); + std::this_thread::sleep_for(std::chrono::milliseconds(ms)); + waitingTime += ms; } - bool allFound = allWindowsFound(); - Logger::info(L"Finished moving new windows, all windows found: {}", allFound); - - if (!allFound) + if (waitingTime >= maxLaunchingWaitingTime) { - std::vector allWindows = WindowEnumerator::Enumerate(WindowFilter::Filter); - for (HWND window : allWindows) - { - processWindow(window); - } + Logger::info(L"Launching timeout expired"); + } + + Logger::info(L"Finished moving new windows"); + + // wait for 3 seconds after all apps launched + waitingTime = 0; + while (!m_launchingStatus.AllLaunchedAndMoved() && waitingTime < maxRepositionWaitingTime) + { + processWindows(true); + std::this_thread::sleep_for(std::chrono::milliseconds(ms)); + waitingTime += ms; + } + + if (waitingTime >= maxRepositionWaitingTime) + { + Logger::info(L"Repositioning timeout expired"); } } @@ -146,11 +148,26 @@ WindowArranger::WindowArranger(WorkspacesData::WorkspacesProject project, const // processWindow(window); //} +void WindowArranger::processWindows(bool processAll) +{ + std::vector windows = WindowEnumerator::Enumerate(WindowFilter::Filter); + + if (!processAll) + { + std::vector windowsDiff{}; + std::copy_if(windows.begin(), windows.end(), std::back_inserter(windowsDiff), [&](HWND window) { return std::find(m_windowsBefore.begin(), m_windowsBefore.end(), window) == m_windowsBefore.end(); }); + windows = windowsDiff; + } + + for (HWND window : windows) + { + processWindow(window); + } +} + void WindowArranger::processWindow(HWND window) { - // check if this window is already handled - auto windowIter = std::find_if(m_launchingApps.begin(), m_launchingApps.end(), [&](const auto& val) { return val.second.window == window; }); - if (windowIter != m_launchingApps.end()) + if (m_launchingStatus.IsWindowProcessed(window)) { return; } @@ -176,27 +193,34 @@ void WindowArranger::processWindow(HWND window) return; } - auto iter = std::find_if(m_launchingApps.begin(), m_launchingApps.end(), [&](const auto& val) + const auto& apps = m_launchingStatus.Get(); + auto iter = std::find_if(apps.begin(), apps.end(), [&](const auto& val) { - return val.second.state == LaunchingState::Waiting && !val.second.window && (val.first.name == data.value().name || val.first.path == data.value().installPath); + return val.second.state == LaunchingState::Launched && + !val.second.window && + (val.first.name == data.value().name || val.first.path == data.value().installPath); }); - if (iter == m_launchingApps.end()) + + if (iter == apps.end()) { - Logger::info(L"A window of {} is not in the project", processPath); + Logger::info(L"Skip {}", processPath); return; } - iter->second.window = window; if (moveWindow(window, iter->first)) { - iter->second.state = LaunchingState::LaunchedAndMoved; + m_launchingStatus.Update(iter->first, window, LaunchingState::LaunchedAndMoved); } else { - iter->second.state = LaunchingState::Failed; + m_launchingStatus.Update(iter->first, window, LaunchingState::Failed); } - m_ipcHelper.send(WorkspacesData::AppLaunchInfoJSON::ToJson({iter->first, nullptr, iter->second.state}).ToString().c_str()); + auto state = m_launchingStatus.Get(iter->first); + if (state.has_value()) + { + sendUpdatedState(state.value()); + } } bool WindowArranger::moveWindow(HWND window, const WorkspacesData::WorkspacesProject::Application& app) @@ -247,9 +271,27 @@ bool WindowArranger::moveWindow(HWND window, const WorkspacesData::WorkspacesPro } } -bool WindowArranger::allWindowsFound() const +void WindowArranger::receiveIpcMessage(const std::wstring& message) { - return std::find_if(m_launchingApps.begin(), m_launchingApps.end(), [&](const std::pair& val) { - return val.second.window == nullptr; - }) == m_launchingApps.end(); + try + { + auto data = WorkspacesData::AppLaunchInfoJSON::FromJson(json::JsonValue::Parse(message).GetObjectW()); + if (data.has_value()) + { + m_launchingStatus.Update(data.value().application, data.value().state); + } + else + { + Logger::error(L"Failed to parse message from WorkspacesLauncher"); + } + } + catch (const winrt::hresult_error&) + { + Logger::error(L"Failed to parse message from WorkspacesLauncher"); + } +} + +void WindowArranger::sendUpdatedState(const WorkspacesData::LaunchingAppState& data) const +{ + m_ipcHelper.send(WorkspacesData::AppLaunchInfoJSON::ToJson({ data.application, nullptr, data.state }).ToString().c_str()); } diff --git a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.h b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.h index e18b52829b..da708e550f 100644 --- a/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.h +++ b/src/modules/Workspaces/WorkspacesWindowArranger/WindowArranger.h @@ -10,7 +10,7 @@ class WindowArranger { public: - WindowArranger(WorkspacesData::WorkspacesProject project, const IPCHelper& ipcHelper); + WindowArranger(WorkspacesData::WorkspacesProject project); ~WindowArranger() = default; private: @@ -19,12 +19,14 @@ private: const std::vector m_monitors; const Utils::Apps::AppList m_installedApps; //const WindowCreationHandler m_windowCreationHandler; - const IPCHelper& m_ipcHelper; - WorkspacesData::LaunchingAppStateMap m_launchingApps{}; + IPCHelper m_ipcHelper; + LaunchingStatus m_launchingStatus; //void onWindowCreated(HWND window); + void processWindows(bool processAll); void processWindow(HWND window); bool moveWindow(HWND window, const WorkspacesData::WorkspacesProject::Application& app); - bool allWindowsFound() const; + void receiveIpcMessage(const std::wstring& message); + void sendUpdatedState(const WorkspacesData::LaunchingAppState& data) const; }; diff --git a/src/modules/Workspaces/WorkspacesWindowArranger/main.cpp b/src/modules/Workspaces/WorkspacesWindowArranger/main.cpp index 1c6a72dae5..0d95243694 100644 --- a/src/modules/Workspaces/WorkspacesWindowArranger/main.cpp +++ b/src/modules/Workspaces/WorkspacesWindowArranger/main.cpp @@ -90,12 +90,9 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm return 1; } - // IPC - IPCHelper ipc(IPCHelperStrings::WindowArrangerPipeName, IPCHelperStrings::LauncherArrangerPipeName, nullptr); - // arrange windows Logger::info(L"Arrange windows from Workspace {} : {}", projectToLaunch.name, projectToLaunch.id); - WindowArranger windowArranger(projectToLaunch, ipc); + WindowArranger windowArranger(projectToLaunch); //run_message_loop(); Logger::debug(L"Arranger finished"); From d51ca9f8d4ebf15dee7060315e75aca3ccf941f1 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Mon, 14 Oct 2024 14:59:10 +0100 Subject: [PATCH 30/54] [ci]Fix running xaml styles in CI (#35426) XAML style checkers aren't running right now in PR CI. This allowed some XAML style errors to cause build errors in release CI. This PR contains the following fixes: - Fix XAML style of files that have slipped. - Add errors to the scripts that depend on dotnet commands if it fails. - Add .NET 6 on CI so that applyXamlStyling.ps1 and verifyNugetPackages.ps1 run correctly again. --- .pipelines/applyXamlStyling.ps1 | 5 ++++- .pipelines/v2/templates/job-build-project.yml | 10 ++++------ .pipelines/verifyNugetPackages.ps1 | 6 ++++++ src/modules/launcher/PowerLauncher/MainWindow.xaml | 4 ++-- src/modules/launcher/PowerLauncher/ResultList.xaml | 4 ++-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.pipelines/applyXamlStyling.ps1 b/.pipelines/applyXamlStyling.ps1 index 8a9dd1b1df..e47edd0c0f 100644 --- a/.pipelines/applyXamlStyling.ps1 +++ b/.pipelines/applyXamlStyling.ps1 @@ -117,7 +117,10 @@ else { Write-Error 'XAML Styling is incorrect, please run `.\.pipelines\applyXamlStyling.ps1 -Main` locally.' } - + if ($lastExitCode -lt 0) + { + Write-Error "Error running dotnet tool run, with the exit code $lastExitCode. Please verify logs and running environment." + } # Return XAML Styler Status exit $lastExitCode } diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index d24158658b..565ba3cab7 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -127,12 +127,10 @@ jobs: Write-Host "##vso[task.setvariable variable=MSBuildCacheParameters]$MSBuildCacheParameters" displayName: Prepare MSBuildCache variables - - ${{ if eq(parameters.codeSign, true) }}: - # Only required if we're using ESRP - - template: steps-ensure-dotnet-version.yml - parameters: - sdk: true - version: '6.0' + - template: steps-ensure-dotnet-version.yml + parameters: + sdk: true + version: '6.0' - template: steps-ensure-dotnet-version.yml parameters: diff --git a/.pipelines/verifyNugetPackages.ps1 b/.pipelines/verifyNugetPackages.ps1 index 1fcc5237f0..54d0137121 100644 --- a/.pipelines/verifyNugetPackages.ps1 +++ b/.pipelines/verifyNugetPackages.ps1 @@ -8,6 +8,12 @@ Write-Host "Verifying Nuget packages for $solution" dotnet tool restore dotnet consolidate -s $solution +if ($lastExitCode -ne 0) +{ + $result = $lastExitCode + Write-Error "Error running dotnet consolidate, with the exit code $lastExitCode. Please verify logs and running environment." + exit $result +} if (-not $?) { diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml b/src/modules/launcher/PowerLauncher/MainWindow.xaml index 30acc5c3c0..c8f1111e06 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml @@ -72,10 +72,10 @@ x:Name="pluginsHintsList" Grid.Row="1" Margin="16,0,0,0" + Background="Transparent" + BorderBrush="Transparent" ItemContainerStyle="{StaticResource PluginsListViewItemStyle}" ItemsSource="{Binding Plugins}" - Background="Transparent" - BorderBrush="Transparent" PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" diff --git a/src/modules/launcher/PowerLauncher/ResultList.xaml b/src/modules/launcher/PowerLauncher/ResultList.xaml index 7e387e9807..b829d5218f 100644 --- a/src/modules/launcher/PowerLauncher/ResultList.xaml +++ b/src/modules/launcher/PowerLauncher/ResultList.xaml @@ -32,9 +32,9 @@ Date: Thu, 17 Oct 2024 05:14:57 -0400 Subject: [PATCH 31/54] [Analyzers] Resolve Stylecop SA1516 violations and others to enable fully building on VS 17.12 (#35248) * [Analyzers][Settings] Fix SA1516 * [Analyzers][Workspaces] Fix SA1516 * [Analyzers][Awake] Fix SA1516 * [Analyzers][Wox] Fix SA1516 * [MWB] Disable CA1716 warning on class name * [Wox] Update ExecuteFilePath property visibility for Json Source Generator * [Analyzers][MWB] Fix CA1716 on NativeMethods. --------- Co-authored-by: Jaime Bernardo --- src/modules/MouseWithoutBorders/App/Class/Extensions.cs | 3 +++ src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs | 3 +++ src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs | 1 + .../Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs | 2 ++ .../Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs | 1 + .../Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs | 1 + .../WorkspacesLauncherUI/ViewModels/MainViewModel.cs | 1 + src/modules/awake/Awake/Core/Manager.cs | 1 + .../Awake/Core/Threading/SingleThreadSynchronizationContext.cs | 1 + src/modules/awake/Awake/Core/TrayHelper.cs | 1 + src/modules/awake/Awake/Program.cs | 1 + src/modules/launcher/Wox.Plugin/PluginLoadContext.cs | 1 + src/modules/launcher/Wox.Plugin/PluginMetadata.cs | 3 ++- src/settings-ui/Settings.UI.Library/EnabledModules.cs | 1 + .../Settings.UI.Library/EnvironmentVariablesProperties.cs | 1 + .../Settings.UI.Library/EnvironmentVariablesSettings.cs | 1 + src/settings-ui/Settings.UI.Library/FZConfigProperties.cs | 1 + src/settings-ui/Settings.UI.Library/FancyZonesSettings.cs | 1 + .../Settings.UI.Library/FileLocksmithLocalProperties.cs | 1 + src/settings-ui/Settings.UI.Library/FileLocksmithSettings.cs | 1 + src/settings-ui/Settings.UI.Library/FindMyMouseProperties.cs | 1 + src/settings-ui/Settings.UI.Library/FindMyMouseSettings.cs | 1 + src/settings-ui/Settings.UI.Library/GeneralSettings.cs | 1 + src/settings-ui/Settings.UI.Library/Helpers/ColorNameHelper.cs | 1 + src/settings-ui/Settings.UI.Library/HostsProperties.cs | 1 + src/settings-ui/Settings.UI.Library/HostsSettings.cs | 1 + src/settings-ui/Settings.UI.Library/HotkeySettings.cs | 1 + .../Settings.UI.Library/HotkeySettingsControlHook.cs | 1 + src/settings-ui/Settings.UI.Library/ISettingsUtils.cs | 1 + src/settings-ui/Settings.UI.Library/ImageResizerProperties.cs | 1 + src/settings-ui/Settings.UI.Library/ImageResizerSettings.cs | 1 + src/settings-ui/Settings.UI.Library/KeyboardManagerProfile.cs | 1 + .../Settings.UI.Library/KeyboardManagerProperties.cs | 1 + src/settings-ui/Settings.UI.Library/KeyboardManagerSettings.cs | 1 + src/settings-ui/Settings.UI.Library/KeysDataModel.cs | 1 + src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs | 1 + src/settings-ui/Settings.UI.Library/MeasureToolSettings.cs | 1 + .../Settings.UI.Library/MouseHighlighterProperties.cs | 1 + .../Settings.UI.Library/MouseHighlighterSettings.cs | 1 + src/settings-ui/Settings.UI.Library/MouseJumpProperties.cs | 1 + src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs | 1 + .../Settings.UI.Library/MousePointerCrosshairsProperties.cs | 1 + .../Settings.UI.Library/MousePointerCrosshairsSettings.cs | 1 + .../Settings.UI.Library/MouseWithoutBordersProperties.cs | 1 + .../Settings.UI.Library/MouseWithoutBordersSettings.cs | 1 + src/settings-ui/Settings.UI.Library/NewPlusSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PeekProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PeekSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PowerLauncherProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerLauncherSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PowerOcrProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerOcrSettings.cs | 1 + src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerPreviewSettings.cs | 1 + .../Settings.UI.Library/PowerRenameLocalProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerRenameProperties.cs | 1 + src/settings-ui/Settings.UI.Library/PowerRenameSettings.cs | 1 + src/settings-ui/Settings.UI.Library/RegistryPreviewSettings.cs | 1 + src/settings-ui/Settings.UI.Library/SettingPath.cs | 1 + .../Settings.UI.Library/SettingsBackupAndRestoreUtils.cs | 1 + src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs | 1 + src/settings-ui/Settings.UI.Library/SettingsUtils.cs | 1 + src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs | 1 + src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs | 1 + .../Telemetry/Events/CmdNotFoundInstallEvent.cs | 1 + .../Telemetry/Events/CmdNotFoundUninstallEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/OobeModuleRunEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/OobeSectionEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/OobeSettingsEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/OobeStartedEvent.cs | 1 + .../Telemetry/Events/OobeVariantAssignmentEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/ScoobeStartedEvent.cs | 1 + .../Settings.UI.Library/Telemetry/Events/SettingsBootEvent.cs | 1 + .../Telemetry/Events/SettingsEnabledEvent.cs | 1 + .../Telemetry/Events/TrayFlyoutActivatedEvent.cs | 1 + .../Telemetry/Events/TrayFlyoutModuleRunEvent.cs | 1 + .../Settings.UI.Library/Utilities/CommandLineUtils.cs | 1 + .../Utilities/GetSettingCommandLineCommand.cs | 1 + src/settings-ui/Settings.UI.Library/Utilities/Helper.cs | 1 + .../Utilities/SetAdditionalSettingsCommandLineCommand.cs | 1 + .../Utilities/SetSettingCommandLineCommand.cs | 1 + .../Settings.UI.Library/VideoConferenceConfigProperties.cs | 1 + src/settings-ui/Settings.UI.Library/VideoConferenceSettings.cs | 1 + src/settings-ui/Settings.UI.Library/WorkspacesSettings.cs | 1 + .../BackwardsCompatibility/BackCompatTestProperties.cs | 1 + .../Settings.UI.UnitTests/Cmd/SetSettingCommandTests.cs | 1 + .../Settings.UI.UnitTests/Mocks/IIOProviderMocks.cs | 1 + .../Settings.UI.UnitTests/ModelsTests/HelperTest.cs | 1 + .../Settings.UI.UnitTests/ModelsTests/SettingsUtilsTests.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/ColorPicker.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/FancyZones.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/General.cs | 2 ++ .../Settings.UI.UnitTests/ViewModelTests/ImageResizer.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/KeyboardManager.cs | 1 + .../ViewModelTests/PowerLauncherViewModelTest.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/PowerPreview.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/PowerRename.cs | 1 + .../Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs | 1 + .../Settings.UI/Activation/DefaultActivationHandler.cs | 1 + .../Settings.UI/Converters/AwakeModeToIntConverter.cs | 1 + src/settings-ui/Settings.UI/Converters/ColorFormatConverter.cs | 1 + .../Settings.UI/Converters/ImageResizerFitToIntConverter.cs | 1 + .../Settings.UI/Converters/ImageResizerFitToStringConverter.cs | 1 + .../Settings.UI/Converters/ImageResizerUnitToIntConverter.cs | 1 + .../Converters/ImageResizerUnitToStringConverter.cs | 1 + .../Converters/IndexBitFieldToVisibilityConverter.cs | 1 + .../Settings.UI/Converters/RunOptionTemplateSelector.cs | 1 + .../Settings.UI/Converters/StringToInfoBarSeverityConverter.cs | 1 + .../Settings.UI/Converters/UpdateStateToBoolConverter.cs | 1 + src/settings-ui/Settings.UI/Helpers/NavHelper.cs | 1 + src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs | 1 + src/settings-ui/Settings.UI/Helpers/WindowHelper.cs | 1 + src/settings-ui/Settings.UI/Services/ActivationService.cs | 1 + src/settings-ui/Settings.UI/Services/NavigationService.cs | 1 + src/settings-ui/Settings.UI/Services/ThemeService.cs | 1 + src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs | 1 + .../SettingsXAML/Controls/CheckBoxWithDescriptionControl.cs | 1 + .../SettingsXAML/Controls/ColorFormatEditor.xaml.cs | 1 + .../SettingsXAML/Controls/FancyZonesPreviewControl.xaml.cs | 1 + .../Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs | 1 + .../SettingsXAML/Controls/PowerAccentShortcutControl.xaml.cs | 1 + .../SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs | 1 + .../Controls/SettingsPageControl/SettingsPageControl.xaml.cs | 1 + .../Controls/ShortcutControl/ShortcutControl.xaml.cs | 1 + .../ShortcutControl/ShortcutDialogContentControl.xaml.cs | 1 + .../ShortcutControl/ShortcutWithTextLabelControl.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs | 1 + src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs | 1 + .../SettingsXAML/OOBE/Views/OobeColorPicker.xaml.cs | 1 + .../SettingsXAML/OOBE/Views/OobeEnvironmentVariables.xaml.cs | 1 + .../Settings.UI/SettingsXAML/OOBE/Views/OobeHosts.xaml.cs | 1 + .../SettingsXAML/OOBE/Views/OobeOverviewPlaceholder.xaml.cs | 1 + .../Settings.UI/SettingsXAML/OOBE/Views/OobeRun.xaml.cs | 1 + .../Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml.cs | 1 + .../SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs | 1 + .../Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs | 1 + src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/ImageResizerPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml.cs | 1 + .../SettingsXAML/Views/MouseWithoutBordersPage.xaml.cs | 2 ++ .../Settings.UI/SettingsXAML/Views/NewPlusPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs | 1 + .../Settings.UI/SettingsXAML/Views/VideoConference.xaml.cs | 1 + .../Settings.UI/ViewModels/AdvancedPasteViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/CropAndLockViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs | 1 + src/settings-ui/Settings.UI/ViewModels/DashboardModuleItem.cs | 1 + src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs | 1 + .../Settings.UI/ViewModels/EnvironmentVariablesViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/FancyZonesViewModel.cs | 1 + .../Settings.UI/ViewModels/FileLocksmithViewModel.cs | 1 + .../Settings.UI/ViewModels/Flyout/AllAppsViewModel.cs | 1 + .../Settings.UI/ViewModels/Flyout/FlyoutMenuItem.cs | 1 + .../Settings.UI/ViewModels/Flyout/LauncherViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/HostsViewModel.cs | 1 + .../Settings.UI/ViewModels/ImageResizerViewModel.cs | 1 + .../Settings.UI/ViewModels/KeyboardManagerViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/MeasureToolViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs | 1 + .../Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs | 2 ++ src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs | 1 + .../Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs | 1 + .../Settings.UI/ViewModels/PowerLauncherPluginViewModel.cs | 1 + .../Settings.UI/ViewModels/PowerLauncherViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs | 1 + .../Settings.UI/ViewModels/PowerPreviewViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/PowerRenameViewModel.cs | 1 + .../Settings.UI/ViewModels/RegistryPreviewViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/ShellViewModel.cs | 1 + .../Settings.UI/ViewModels/ShortcutGuideViewModel.cs | 1 + .../Settings.UI/ViewModels/VideoConferenceViewModel.cs | 1 + src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs | 1 + 190 files changed, 199 insertions(+), 1 deletion(-) diff --git a/src/modules/MouseWithoutBorders/App/Class/Extensions.cs b/src/modules/MouseWithoutBorders/App/Class/Extensions.cs index e199a5797c..904a14a3a5 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Extensions.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Extensions.cs @@ -6,7 +6,10 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; +// Disable the warning to preserve original code +#pragma warning disable CA1716 namespace MouseWithoutBorders.Class +#pragma warning restore CA1716 { internal static class Extensions { diff --git a/src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs b/src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs index 758b41d331..01371bb2ac 100644 --- a/src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs +++ b/src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs @@ -36,7 +36,10 @@ using System.Text; [module: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope = "member", Target = "MouseWithoutBorders.NativeMethods.#GetAsyncKeyState(System.IntPtr)", MessageId = "0", Justification = "Dotnet port with style preservation")] [module: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope = "member", Target = "MouseWithoutBorders.NativeMethods.#GetAsyncKeyState(System.IntPtr)", MessageId = "return", Justification = "Dotnet port with style preservation")] +// Disable the warning to preserve original code +#pragma warning disable CA1716 namespace MouseWithoutBorders.Class +#pragma warning restore CA1716 { internal partial class NativeMethods { diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs b/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs index 64686fc139..3359c001d5 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Threading; using System.Windows; + using Common.UI; using ManagedCommon; using PowerToys.Interop; diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs b/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs index dc19b86647..6e9ad24379 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs @@ -3,7 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Workspaces.Data; + using static WorkspacesLauncherUI.Data.AppLaunchData; using static WorkspacesLauncherUI.Data.AppLaunchInfosData; diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs b/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs index aa64510ba9..c01ffaba8c 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Workspaces.Data; using static WorkspacesLauncherUI.Data.AppLaunchInfoData; diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs b/src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs index f3878a3847..073ee9c864 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs @@ -13,6 +13,7 @@ using System.Text.Json.Serialization; using System.Text.RegularExpressions; using System.Windows.Media; using System.Windows.Media.Imaging; + using ManagedCommon; using Windows.Management.Deployment; using WorkspacesLauncherUI.Data; diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs index 7002c9ef05..103b08d6f7 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; + using ManagedCommon; using WorkspacesLauncherUI.Data; using WorkspacesLauncherUI.Models; diff --git a/src/modules/awake/Awake/Core/Manager.cs b/src/modules/awake/Awake/Core/Manager.cs index f237250635..ba69f9c8df 100644 --- a/src/modules/awake/Awake/Core/Manager.cs +++ b/src/modules/awake/Awake/Core/Manager.cs @@ -14,6 +14,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Text.Json; using System.Threading; + using Awake.Core.Models; using Awake.Core.Native; using Awake.Properties; diff --git a/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs index 04c28dfd34..e45c13bad0 100644 --- a/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs +++ b/src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Threading; + using ManagedCommon; namespace Awake.Core.Threading diff --git a/src/modules/awake/Awake/Core/TrayHelper.cs b/src/modules/awake/Awake/Core/TrayHelper.cs index 0545f97a8f..8568f80cfa 100644 --- a/src/modules/awake/Awake/Core/TrayHelper.cs +++ b/src/modules/awake/Awake/Core/TrayHelper.cs @@ -9,6 +9,7 @@ using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Threading; + using Awake.Core.Models; using Awake.Core.Native; using Awake.Core.Threading; diff --git a/src/modules/awake/Awake/Program.cs b/src/modules/awake/Awake/Program.cs index d1311ef51f..2dd22db874 100644 --- a/src/modules/awake/Awake/Program.cs +++ b/src/modules/awake/Awake/Program.cs @@ -15,6 +15,7 @@ using System.Reflection; using System.Text.Json; using System.Threading; using System.Threading.Tasks; + using Awake.Core; using Awake.Core.Models; using Awake.Core.Native; diff --git a/src/modules/launcher/Wox.Plugin/PluginLoadContext.cs b/src/modules/launcher/Wox.Plugin/PluginLoadContext.cs index 9f4bd29632..b0c618b5cf 100644 --- a/src/modules/launcher/Wox.Plugin/PluginLoadContext.cs +++ b/src/modules/launcher/Wox.Plugin/PluginLoadContext.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using System.Reflection; using System.Runtime.Loader; + using ManagedCommon; namespace Wox.Plugin diff --git a/src/modules/launcher/Wox.Plugin/PluginMetadata.cs b/src/modules/launcher/Wox.Plugin/PluginMetadata.cs index 6ee9703bd0..9a22fa485a 100644 --- a/src/modules/launcher/Wox.Plugin/PluginMetadata.cs +++ b/src/modules/launcher/Wox.Plugin/PluginMetadata.cs @@ -36,8 +36,9 @@ namespace Wox.Plugin [JsonIgnore] public bool IsEnabledPolicyConfigured { get; set; } + // Needs to be other than private set in order to be visible to the Json Source Generator [JsonInclude] - public string ExecuteFilePath { get; private set; } + public string ExecuteFilePath { get; internal set; } public string ExecuteFileName { get; set; } diff --git a/src/settings-ui/Settings.UI.Library/EnabledModules.cs b/src/settings-ui/Settings.UI.Library/EnabledModules.cs index ebf70464d5..604b4c46ab 100644 --- a/src/settings-ui/Settings.UI.Library/EnabledModules.cs +++ b/src/settings-ui/Settings.UI.Library/EnabledModules.cs @@ -6,6 +6,7 @@ using System; using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.Telemetry; using Microsoft.PowerToys.Telemetry; diff --git a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesProperties.cs b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesProperties.cs index 2d2b93d95f..9319741de0 100644 --- a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesProperties.cs +++ b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Enumerations; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs index dfa79a537b..d54641e977 100644 --- a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs +++ b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FZConfigProperties.cs b/src/settings-ui/Settings.UI.Library/FZConfigProperties.cs index 51a0269523..9150cdbe90 100644 --- a/src/settings-ui/Settings.UI.Library/FZConfigProperties.cs +++ b/src/settings-ui/Settings.UI.Library/FZConfigProperties.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FancyZonesSettings.cs b/src/settings-ui/Settings.UI.Library/FancyZonesSettings.cs index bff72a5984..817b128aa4 100644 --- a/src/settings-ui/Settings.UI.Library/FancyZonesSettings.cs +++ b/src/settings-ui/Settings.UI.Library/FancyZonesSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FileLocksmithLocalProperties.cs b/src/settings-ui/Settings.UI.Library/FileLocksmithLocalProperties.cs index f998e5b4dd..747baf6dff 100644 --- a/src/settings-ui/Settings.UI.Library/FileLocksmithLocalProperties.cs +++ b/src/settings-ui/Settings.UI.Library/FileLocksmithLocalProperties.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FileLocksmithSettings.cs b/src/settings-ui/Settings.UI.Library/FileLocksmithSettings.cs index 683746392f..30ee899173 100644 --- a/src/settings-ui/Settings.UI.Library/FileLocksmithSettings.cs +++ b/src/settings-ui/Settings.UI.Library/FileLocksmithSettings.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FindMyMouseProperties.cs b/src/settings-ui/Settings.UI.Library/FindMyMouseProperties.cs index 64ca0457aa..a028eb9e43 100644 --- a/src/settings-ui/Settings.UI.Library/FindMyMouseProperties.cs +++ b/src/settings-ui/Settings.UI.Library/FindMyMouseProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/FindMyMouseSettings.cs b/src/settings-ui/Settings.UI.Library/FindMyMouseSettings.cs index 921bd62992..aca45d0b01 100644 --- a/src/settings-ui/Settings.UI.Library/FindMyMouseSettings.cs +++ b/src/settings-ui/Settings.UI.Library/FindMyMouseSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/GeneralSettings.cs b/src/settings-ui/Settings.UI.Library/GeneralSettings.cs index 6873b1962a..ed7b503150 100644 --- a/src/settings-ui/Settings.UI.Library/GeneralSettings.cs +++ b/src/settings-ui/Settings.UI.Library/GeneralSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Microsoft.PowerToys.Settings.UI.Library.Utilities; diff --git a/src/settings-ui/Settings.UI.Library/Helpers/ColorNameHelper.cs b/src/settings-ui/Settings.UI.Library/Helpers/ColorNameHelper.cs index 02c944385f..6d00db0b28 100644 --- a/src/settings-ui/Settings.UI.Library/Helpers/ColorNameHelper.cs +++ b/src/settings-ui/Settings.UI.Library/Helpers/ColorNameHelper.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Drawing; + using global::Settings.UI.Library.Resources; using ManagedCommon; diff --git a/src/settings-ui/Settings.UI.Library/HostsProperties.cs b/src/settings-ui/Settings.UI.Library/HostsProperties.cs index ea05a34400..90a576601d 100644 --- a/src/settings-ui/Settings.UI.Library/HostsProperties.cs +++ b/src/settings-ui/Settings.UI.Library/HostsProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; using Settings.UI.Library.Enumerations; diff --git a/src/settings-ui/Settings.UI.Library/HostsSettings.cs b/src/settings-ui/Settings.UI.Library/HostsSettings.cs index 5e15a7e664..bb339f178c 100644 --- a/src/settings-ui/Settings.UI.Library/HostsSettings.cs +++ b/src/settings-ui/Settings.UI.Library/HostsSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/HotkeySettings.cs b/src/settings-ui/Settings.UI.Library/HotkeySettings.cs index 38018f59d1..ff588eafbd 100644 --- a/src/settings-ui/Settings.UI.Library/HotkeySettings.cs +++ b/src/settings-ui/Settings.UI.Library/HotkeySettings.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Globalization; using System.Text; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Utilities; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/HotkeySettingsControlHook.cs b/src/settings-ui/Settings.UI.Library/HotkeySettingsControlHook.cs index cc932b3584..0ff67df638 100644 --- a/src/settings-ui/Settings.UI.Library/HotkeySettingsControlHook.cs +++ b/src/settings-ui/Settings.UI.Library/HotkeySettingsControlHook.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using PowerToys.Interop; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/ISettingsUtils.cs b/src/settings-ui/Settings.UI.Library/ISettingsUtils.cs index a6f340e83c..10e8bf26ac 100644 --- a/src/settings-ui/Settings.UI.Library/ISettingsUtils.cs +++ b/src/settings-ui/Settings.UI.Library/ISettingsUtils.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/ImageResizerProperties.cs b/src/settings-ui/Settings.UI.Library/ImageResizerProperties.cs index 8d57055881..acef5a2f4d 100644 --- a/src/settings-ui/Settings.UI.Library/ImageResizerProperties.cs +++ b/src/settings-ui/Settings.UI.Library/ImageResizerProperties.cs @@ -6,6 +6,7 @@ using System; using System.Collections.ObjectModel; using System.Text.Json; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/ImageResizerSettings.cs b/src/settings-ui/Settings.UI.Library/ImageResizerSettings.cs index f43c76ba70..97f785d6c2 100644 --- a/src/settings-ui/Settings.UI.Library/ImageResizerSettings.cs +++ b/src/settings-ui/Settings.UI.Library/ImageResizerSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/KeyboardManagerProfile.cs b/src/settings-ui/Settings.UI.Library/KeyboardManagerProfile.cs index f47b1f0ded..983f9a1f6a 100644 --- a/src/settings-ui/Settings.UI.Library/KeyboardManagerProfile.cs +++ b/src/settings-ui/Settings.UI.Library/KeyboardManagerProfile.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/KeyboardManagerProperties.cs b/src/settings-ui/Settings.UI.Library/KeyboardManagerProperties.cs index 86ab049f7c..25a84dbb2c 100644 --- a/src/settings-ui/Settings.UI.Library/KeyboardManagerProperties.cs +++ b/src/settings-ui/Settings.UI.Library/KeyboardManagerProperties.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/KeyboardManagerSettings.cs b/src/settings-ui/Settings.UI.Library/KeyboardManagerSettings.cs index a52fdceea2..5682d6d865 100644 --- a/src/settings-ui/Settings.UI.Library/KeyboardManagerSettings.cs +++ b/src/settings-ui/Settings.UI.Library/KeyboardManagerSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/KeysDataModel.cs b/src/settings-ui/Settings.UI.Library/KeysDataModel.cs index 5788aad96b..1232d384b8 100644 --- a/src/settings-ui/Settings.UI.Library/KeysDataModel.cs +++ b/src/settings-ui/Settings.UI.Library/KeysDataModel.cs @@ -14,6 +14,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; using System.Windows.Input; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Utilities; using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands; diff --git a/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs b/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs index 97a0c3219a..ebda5953d0 100644 --- a/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; using Settings.UI.Library.Enumerations; diff --git a/src/settings-ui/Settings.UI.Library/MeasureToolSettings.cs b/src/settings-ui/Settings.UI.Library/MeasureToolSettings.cs index 65275ba6ce..5720c70ca5 100644 --- a/src/settings-ui/Settings.UI.Library/MeasureToolSettings.cs +++ b/src/settings-ui/Settings.UI.Library/MeasureToolSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseHighlighterProperties.cs b/src/settings-ui/Settings.UI.Library/MouseHighlighterProperties.cs index bb847c2e30..298b0d9230 100644 --- a/src/settings-ui/Settings.UI.Library/MouseHighlighterProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MouseHighlighterProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseHighlighterSettings.cs b/src/settings-ui/Settings.UI.Library/MouseHighlighterSettings.cs index b677ee2175..e23a7fe288 100644 --- a/src/settings-ui/Settings.UI.Library/MouseHighlighterSettings.cs +++ b/src/settings-ui/Settings.UI.Library/MouseHighlighterSettings.cs @@ -5,6 +5,7 @@ using System.Globalization; using System.Runtime.InteropServices; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseJumpProperties.cs b/src/settings-ui/Settings.UI.Library/MouseJumpProperties.cs index c24d949dc1..0c26e86124 100644 --- a/src/settings-ui/Settings.UI.Library/MouseJumpProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MouseJumpProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs b/src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs index 596e6cd91b..fbeb1eaf68 100644 --- a/src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs +++ b/src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsProperties.cs b/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsProperties.cs index 46c9e4fe03..9b0e530a2a 100644 --- a/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsSettings.cs b/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsSettings.cs index 7c1f253271..2658a2adec 100644 --- a/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsSettings.cs +++ b/src/settings-ui/Settings.UI.Library/MousePointerCrosshairsSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseWithoutBordersProperties.cs b/src/settings-ui/Settings.UI.Library/MouseWithoutBordersProperties.cs index 5bf4ae53de..265b8a1e2d 100644 --- a/src/settings-ui/Settings.UI.Library/MouseWithoutBordersProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MouseWithoutBordersProperties.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/MouseWithoutBordersSettings.cs b/src/settings-ui/Settings.UI.Library/MouseWithoutBordersSettings.cs index f030d98bf1..6a51a150e5 100644 --- a/src/settings-ui/Settings.UI.Library/MouseWithoutBordersSettings.cs +++ b/src/settings-ui/Settings.UI.Library/MouseWithoutBordersSettings.cs @@ -6,6 +6,7 @@ using System; using System.Diagnostics; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs b/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs index 2450898684..7a37c72a84 100644 --- a/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs +++ b/src/settings-ui/Settings.UI.Library/NewPlusSettings.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Text.Json; using System.Text.Json.Serialization; using System.Text.RegularExpressions; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Settings.UI.Library.Resources; diff --git a/src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs b/src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs index 75562ca9a2..f098b18052 100644 --- a/src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; diff --git a/src/settings-ui/Settings.UI.Library/PeekProperties.cs b/src/settings-ui/Settings.UI.Library/PeekProperties.cs index 6932177df1..1e4514d866 100644 --- a/src/settings-ui/Settings.UI.Library/PeekProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PeekProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PeekSettings.cs b/src/settings-ui/Settings.UI.Library/PeekSettings.cs index 3302f15c64..f5ad2a0e26 100644 --- a/src/settings-ui/Settings.UI.Library/PeekSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PeekSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs b/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs index f471f51c13..4ab0b955c7 100644 --- a/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Enumerations; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs b/src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs index 6302fd5058..f080dcb093 100644 --- a/src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerLauncherProperties.cs b/src/settings-ui/Settings.UI.Library/PowerLauncherProperties.cs index efe7e1e446..590fb2e290 100644 --- a/src/settings-ui/Settings.UI.Library/PowerLauncherProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerLauncherProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using ManagedCommon; using Settings.UI.Library.Attributes; diff --git a/src/settings-ui/Settings.UI.Library/PowerLauncherSettings.cs b/src/settings-ui/Settings.UI.Library/PowerLauncherSettings.cs index 4c7ad70e0c..c21ce67df5 100644 --- a/src/settings-ui/Settings.UI.Library/PowerLauncherSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PowerLauncherSettings.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerOcrProperties.cs b/src/settings-ui/Settings.UI.Library/PowerOcrProperties.cs index 0ea4fcca54..5cba3cfb3e 100644 --- a/src/settings-ui/Settings.UI.Library/PowerOcrProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerOcrProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerOcrSettings.cs b/src/settings-ui/Settings.UI.Library/PowerOcrSettings.cs index 9bf9db87d6..46d176d2b0 100644 --- a/src/settings-ui/Settings.UI.Library/PowerOcrSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PowerOcrSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs b/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs index 1c09438b61..28d76dd067 100644 --- a/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs @@ -5,6 +5,7 @@ using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.Telemetry; using Microsoft.PowerToys.Telemetry; using Settings.UI.Library.Enumerations; diff --git a/src/settings-ui/Settings.UI.Library/PowerPreviewSettings.cs b/src/settings-ui/Settings.UI.Library/PowerPreviewSettings.cs index 5cdb94b923..ba0ac30bb3 100644 --- a/src/settings-ui/Settings.UI.Library/PowerPreviewSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PowerPreviewSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerRenameLocalProperties.cs b/src/settings-ui/Settings.UI.Library/PowerRenameLocalProperties.cs index 5812b2a082..726faf2bc0 100644 --- a/src/settings-ui/Settings.UI.Library/PowerRenameLocalProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerRenameLocalProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerRenameProperties.cs b/src/settings-ui/Settings.UI.Library/PowerRenameProperties.cs index dfe27855ec..dcc10a7bdc 100644 --- a/src/settings-ui/Settings.UI.Library/PowerRenameProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerRenameProperties.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/PowerRenameSettings.cs b/src/settings-ui/Settings.UI.Library/PowerRenameSettings.cs index 39c20a3af1..50bc8cdfe3 100644 --- a/src/settings-ui/Settings.UI.Library/PowerRenameSettings.cs +++ b/src/settings-ui/Settings.UI.Library/PowerRenameSettings.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/RegistryPreviewSettings.cs b/src/settings-ui/Settings.UI.Library/RegistryPreviewSettings.cs index d7dab39ef5..6d9179aba7 100644 --- a/src/settings-ui/Settings.UI.Library/RegistryPreviewSettings.cs +++ b/src/settings-ui/Settings.UI.Library/RegistryPreviewSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/SettingPath.cs b/src/settings-ui/Settings.UI.Library/SettingPath.cs index 3768db9976..94c5d83ca1 100644 --- a/src/settings-ui/Settings.UI.Library/SettingPath.cs +++ b/src/settings-ui/Settings.UI.Library/SettingPath.cs @@ -4,6 +4,7 @@ using System; using System.IO.Abstractions; + using Microsoft.PowerToys.Settings.UI.Library.Utilities; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs b/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs index 98be5a6288..a31878f240 100644 --- a/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs +++ b/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs @@ -15,6 +15,7 @@ using System.Text.Json; using System.Text.Json.Nodes; using System.Text.RegularExpressions; using System.Threading; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Utilities; diff --git a/src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs b/src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs index b9d27dedb9..7f634a2012 100644 --- a/src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs +++ b/src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/SettingsUtils.cs b/src/settings-ui/Settings.UI.Library/SettingsUtils.cs index 30002d956e..13065b1a71 100644 --- a/src/settings-ui/Settings.UI.Library/SettingsUtils.cs +++ b/src/settings-ui/Settings.UI.Library/SettingsUtils.cs @@ -6,6 +6,7 @@ using System; using System.IO; using System.IO.Abstractions; using System.Text.Json; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs index b84fe8b0ae..d34a2f748a 100644 --- a/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs index 174aa4e217..c39e757fe3 100644 --- a/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundInstallEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundInstallEvent.cs index 97d700a8e5..6af5444174 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundInstallEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundInstallEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundUninstallEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundUninstallEvent.cs index ae469903ee..36f90bcfd7 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundUninstallEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/CmdNotFoundUninstallEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeModuleRunEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeModuleRunEvent.cs index 4b0721d410..b6316cd2db 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeModuleRunEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeModuleRunEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSectionEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSectionEvent.cs index bb3265773d..4d762220c3 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSectionEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSectionEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSettingsEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSettingsEvent.cs index f0e7293ed3..499a1b98b3 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSettingsEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeSettingsEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeStartedEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeStartedEvent.cs index 771cdfc402..8912ea3156 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeStartedEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeStartedEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeVariantAssignmentEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeVariantAssignmentEvent.cs index 8f17b58dc3..d4a30550eb 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeVariantAssignmentEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/OobeVariantAssignmentEvent.cs @@ -4,6 +4,7 @@ using System; using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/ScoobeStartedEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/ScoobeStartedEvent.cs index 63b1bf48e2..f8f6c10c41 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/ScoobeStartedEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/ScoobeStartedEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsBootEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsBootEvent.cs index 376ae6f16a..edb989199f 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsBootEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsBootEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsEnabledEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsEnabledEvent.cs index 5cf0ea697a..7abfc8e2c2 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsEnabledEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/SettingsEnabledEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutActivatedEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutActivatedEvent.cs index 8e075aea0c..91600660e4 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutActivatedEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutActivatedEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutModuleRunEvent.cs b/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutModuleRunEvent.cs index c1813e9adb..167cf48dfb 100644 --- a/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutModuleRunEvent.cs +++ b/src/settings-ui/Settings.UI.Library/Telemetry/Events/TrayFlyoutModuleRunEvent.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; + using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry.Events; diff --git a/src/settings-ui/Settings.UI.Library/Utilities/CommandLineUtils.cs b/src/settings-ui/Settings.UI.Library/Utilities/CommandLineUtils.cs index 91703a69c6..a7702e17a2 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/CommandLineUtils.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/CommandLineUtils.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using System.Reflection; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI.Library/Utilities/GetSettingCommandLineCommand.cs b/src/settings-ui/Settings.UI.Library/Utilities/GetSettingCommandLineCommand.cs index e74469795e..a4ad1d1862 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/GetSettingCommandLineCommand.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/GetSettingCommandLineCommand.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Globalization; using System.Text.Json; using System.Xml; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Settings.UI.Library.Attributes; diff --git a/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs b/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs index 3b0f377810..fc1f8d6f7c 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs @@ -9,6 +9,7 @@ using System.IO.Abstractions; using System.Linq; using System.Net.NetworkInformation; using System.Security.Principal; + using Microsoft.PowerToys.Settings.UI.Library.CustomAction; namespace Microsoft.PowerToys.Settings.UI.Library.Utilities diff --git a/src/settings-ui/Settings.UI.Library/Utilities/SetAdditionalSettingsCommandLineCommand.cs b/src/settings-ui/Settings.UI.Library/Utilities/SetAdditionalSettingsCommandLineCommand.cs index 122dccfd4b..29f47a4347 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/SetAdditionalSettingsCommandLineCommand.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/SetAdditionalSettingsCommandLineCommand.cs @@ -12,6 +12,7 @@ using System.Linq; using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI.Library/Utilities/SetSettingCommandLineCommand.cs b/src/settings-ui/Settings.UI.Library/Utilities/SetSettingCommandLineCommand.cs index 1e839a17c8..ab5a88c5d8 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/SetSettingCommandLineCommand.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/SetSettingCommandLineCommand.cs @@ -4,6 +4,7 @@ using System; using System.Reflection; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI.Library/VideoConferenceConfigProperties.cs b/src/settings-ui/Settings.UI.Library/VideoConferenceConfigProperties.cs index c1df38908e..9c7b33f804 100644 --- a/src/settings-ui/Settings.UI.Library/VideoConferenceConfigProperties.cs +++ b/src/settings-ui/Settings.UI.Library/VideoConferenceConfigProperties.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Text.Json.Serialization; + using Settings.UI.Library.Attributes; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/VideoConferenceSettings.cs b/src/settings-ui/Settings.UI.Library/VideoConferenceSettings.cs index 80ead8732e..c33bcdaaa6 100644 --- a/src/settings-ui/Settings.UI.Library/VideoConferenceSettings.cs +++ b/src/settings-ui/Settings.UI.Library/VideoConferenceSettings.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.Library/WorkspacesSettings.cs b/src/settings-ui/Settings.UI.Library/WorkspacesSettings.cs index 00709e418c..1e3ce2261e 100644 --- a/src/settings-ui/Settings.UI.Library/WorkspacesSettings.cs +++ b/src/settings-ui/Settings.UI.Library/WorkspacesSettings.cs @@ -5,6 +5,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; + using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library diff --git a/src/settings-ui/Settings.UI.UnitTests/BackwardsCompatibility/BackCompatTestProperties.cs b/src/settings-ui/Settings.UI.UnitTests/BackwardsCompatibility/BackCompatTestProperties.cs index b1c03a5d89..b2048fa573 100644 --- a/src/settings-ui/Settings.UI.UnitTests/BackwardsCompatibility/BackCompatTestProperties.cs +++ b/src/settings-ui/Settings.UI.UnitTests/BackwardsCompatibility/BackCompatTestProperties.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.IO.Abstractions; using System.Linq.Expressions; using System.Text; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/Cmd/SetSettingCommandTests.cs b/src/settings-ui/Settings.UI.UnitTests/Cmd/SetSettingCommandTests.cs index 572682854e..4c6d1babfd 100644 --- a/src/settings-ui/Settings.UI.UnitTests/Cmd/SetSettingCommandTests.cs +++ b/src/settings-ui/Settings.UI.UnitTests/Cmd/SetSettingCommandTests.cs @@ -4,6 +4,7 @@ using System; using System.IO.Abstractions.TestingHelpers; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.VisualStudio.TestTools.UnitTesting; diff --git a/src/settings-ui/Settings.UI.UnitTests/Mocks/IIOProviderMocks.cs b/src/settings-ui/Settings.UI.UnitTests/Mocks/IIOProviderMocks.cs index 647e3670f3..b5e531d742 100644 --- a/src/settings-ui/Settings.UI.UnitTests/Mocks/IIOProviderMocks.cs +++ b/src/settings-ui/Settings.UI.UnitTests/Mocks/IIOProviderMocks.cs @@ -5,6 +5,7 @@ using System; using System.IO.Abstractions; using System.Linq.Expressions; + using Microsoft.PowerToys.Settings.UI.Library.Utilities; using Moq; diff --git a/src/settings-ui/Settings.UI.UnitTests/ModelsTests/HelperTest.cs b/src/settings-ui/Settings.UI.UnitTests/ModelsTests/HelperTest.cs index dd362e38da..aaa6e87d18 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ModelsTests/HelperTest.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ModelsTests/HelperTest.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library.Utilities; using Microsoft.VisualStudio.TestTools.UnitTesting; diff --git a/src/settings-ui/Settings.UI.UnitTests/ModelsTests/SettingsUtilsTests.cs b/src/settings-ui/Settings.UI.UnitTests/ModelsTests/SettingsUtilsTests.cs index 62e7f7b9af..9b75925cb8 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ModelsTests/SettingsUtilsTests.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ModelsTests/SettingsUtilsTests.cs @@ -6,6 +6,7 @@ using System; using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Microsoft.PowerToys.Settings.UnitTest; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ColorPicker.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ColorPicker.cs index 5fe20f3cda..baf46827c4 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ColorPicker.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ColorPicker.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/FancyZones.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/FancyZones.cs index 0239fbfd71..ef230bde0a 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/FancyZones.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/FancyZones.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/General.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/General.cs index 56da0a21bb..70bfbe4fba 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/General.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/General.cs @@ -3,12 +3,14 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; using Microsoft.PowerToys.Settings.UI.ViewModels; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; + using JsonSerializer = System.Text.Json.JsonSerializer; namespace ViewModelTests diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ImageResizer.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ImageResizer.cs index 4bd392008c..1d2c62daec 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ImageResizer.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ImageResizer.cs @@ -6,6 +6,7 @@ using System; using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/KeyboardManager.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/KeyboardManager.cs index 2234540f4f..89491b2b99 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/KeyboardManager.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/KeyboardManager.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; using Microsoft.VisualStudio.TestTools.UnitTesting; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerLauncherViewModelTest.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerLauncherViewModelTest.cs index a5d09f61b2..f1084d498a 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerLauncherViewModelTest.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerLauncherViewModelTest.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.ViewModels; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerPreview.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerPreview.cs index f70357293e..373b9a3580 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerPreview.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerPreview.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerRename.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerRename.cs index 441fd906e7..278975183b 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerRename.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/PowerRename.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs index b162ecc713..3613d0cfa3 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs @@ -4,6 +4,7 @@ using System; using System.Text.Json; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility; using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks; diff --git a/src/settings-ui/Settings.UI/Activation/DefaultActivationHandler.cs b/src/settings-ui/Settings.UI/Activation/DefaultActivationHandler.cs index c501a23e6b..946fab205c 100644 --- a/src/settings-ui/Settings.UI/Activation/DefaultActivationHandler.cs +++ b/src/settings-ui/Settings.UI/Activation/DefaultActivationHandler.cs @@ -4,6 +4,7 @@ using System; using System.Threading.Tasks; + using Microsoft.PowerToys.Settings.UI.Services; using Windows.ApplicationModel.Activation; diff --git a/src/settings-ui/Settings.UI/Converters/AwakeModeToIntConverter.cs b/src/settings-ui/Settings.UI/Converters/AwakeModeToIntConverter.cs index 1bbae1f8c2..1119b91154 100644 --- a/src/settings-ui/Settings.UI/Converters/AwakeModeToIntConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/AwakeModeToIntConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.UI.Xaml.Data; diff --git a/src/settings-ui/Settings.UI/Converters/ColorFormatConverter.cs b/src/settings-ui/Settings.UI/Converters/ColorFormatConverter.cs index 8b81200d64..428b5d60a5 100644 --- a/src/settings-ui/Settings.UI/Converters/ColorFormatConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/ColorFormatConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using ManagedCommon; using Microsoft.UI.Xaml.Data; diff --git a/src/settings-ui/Settings.UI/Converters/ImageResizerFitToIntConverter.cs b/src/settings-ui/Settings.UI/Converters/ImageResizerFitToIntConverter.cs index 8a68025197..1439e97e7f 100644 --- a/src/settings-ui/Settings.UI/Converters/ImageResizerFitToIntConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/ImageResizerFitToIntConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.UI.Xaml.Data; diff --git a/src/settings-ui/Settings.UI/Converters/ImageResizerFitToStringConverter.cs b/src/settings-ui/Settings.UI/Converters/ImageResizerFitToStringConverter.cs index d9a740db95..bfc991c070 100644 --- a/src/settings-ui/Settings.UI/Converters/ImageResizerFitToStringConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/ImageResizerFitToStringConverter.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; + using Microsoft.UI.Xaml.Data; namespace Microsoft.PowerToys.Settings.UI.Converters diff --git a/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToIntConverter.cs b/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToIntConverter.cs index 0132b86241..0a5087778e 100644 --- a/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToIntConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToIntConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.UI.Xaml.Data; diff --git a/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToStringConverter.cs b/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToStringConverter.cs index 6dc89e65fb..ab4aec8195 100644 --- a/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToStringConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/ImageResizerUnitToStringConverter.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; + using Microsoft.UI.Xaml.Data; namespace Microsoft.PowerToys.Settings.UI.Converters diff --git a/src/settings-ui/Settings.UI/Converters/IndexBitFieldToVisibilityConverter.cs b/src/settings-ui/Settings.UI/Converters/IndexBitFieldToVisibilityConverter.cs index 3295294550..fadefcbfaa 100644 --- a/src/settings-ui/Settings.UI/Converters/IndexBitFieldToVisibilityConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/IndexBitFieldToVisibilityConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; diff --git a/src/settings-ui/Settings.UI/Converters/RunOptionTemplateSelector.cs b/src/settings-ui/Settings.UI/Converters/RunOptionTemplateSelector.cs index 0e742e855a..0093f5f28f 100644 --- a/src/settings-ui/Settings.UI/Converters/RunOptionTemplateSelector.cs +++ b/src/settings-ui/Settings.UI/Converters/RunOptionTemplateSelector.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; using Microsoft.UI.Xaml; diff --git a/src/settings-ui/Settings.UI/Converters/StringToInfoBarSeverityConverter.cs b/src/settings-ui/Settings.UI/Converters/StringToInfoBarSeverityConverter.cs index 548b68889b..af64f9e42f 100644 --- a/src/settings-ui/Settings.UI/Converters/StringToInfoBarSeverityConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/StringToInfoBarSeverityConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.UI.Xaml.Data; namespace Microsoft.PowerToys.Settings.UI.Converters diff --git a/src/settings-ui/Settings.UI/Converters/UpdateStateToBoolConverter.cs b/src/settings-ui/Settings.UI/Converters/UpdateStateToBoolConverter.cs index ecc19dbd7c..15d874a430 100644 --- a/src/settings-ui/Settings.UI/Converters/UpdateStateToBoolConverter.cs +++ b/src/settings-ui/Settings.UI/Converters/UpdateStateToBoolConverter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.UI.Xaml.Data; namespace Microsoft.PowerToys.Settings.UI.Converters diff --git a/src/settings-ui/Settings.UI/Helpers/NavHelper.cs b/src/settings-ui/Settings.UI/Helpers/NavHelper.cs index 12375832da..52fd7a753f 100644 --- a/src/settings-ui/Settings.UI/Helpers/NavHelper.cs +++ b/src/settings-ui/Settings.UI/Helpers/NavHelper.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs b/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs index b4a2e6b6d5..816b6bcc63 100644 --- a/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs +++ b/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; + using Common.UI; namespace Microsoft.PowerToys.Settings.UI.Helpers diff --git a/src/settings-ui/Settings.UI/Helpers/WindowHelper.cs b/src/settings-ui/Settings.UI/Helpers/WindowHelper.cs index 440d6cf902..489e2b9a4a 100644 --- a/src/settings-ui/Settings.UI/Helpers/WindowHelper.cs +++ b/src/settings-ui/Settings.UI/Helpers/WindowHelper.cs @@ -6,6 +6,7 @@ using System; using System.IO; using System.Runtime.InteropServices; using System.Text.Json; + using Microsoft.UI.Xaml; namespace Microsoft.PowerToys.Settings.UI.Helpers diff --git a/src/settings-ui/Settings.UI/Services/ActivationService.cs b/src/settings-ui/Settings.UI/Services/ActivationService.cs index 0d6d241631..86ad2e4d7c 100644 --- a/src/settings-ui/Settings.UI/Services/ActivationService.cs +++ b/src/settings-ui/Settings.UI/Services/ActivationService.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; + using Microsoft.PowerToys.Settings.UI.Activation; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/Services/NavigationService.cs b/src/settings-ui/Settings.UI/Services/NavigationService.cs index be720e2ec6..b70976bd01 100644 --- a/src/settings-ui/Settings.UI/Services/NavigationService.cs +++ b/src/settings-ui/Settings.UI/Services/NavigationService.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media.Animation; diff --git a/src/settings-ui/Settings.UI/Services/ThemeService.cs b/src/settings-ui/Settings.UI/Services/ThemeService.cs index e817c275e4..8df79eca8f 100644 --- a/src/settings-ui/Settings.UI/Services/ThemeService.cs +++ b/src/settings-ui/Settings.UI/Services/ThemeService.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; using Microsoft.UI.Xaml; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs index a820502dcd..4c44dd250b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Text.Json; using System.Threading.Tasks; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/CheckBoxWithDescriptionControl.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/CheckBoxWithDescriptionControl.cs index 9345f442f2..d8b5b6e31a 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/CheckBoxWithDescriptionControl.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/CheckBoxWithDescriptionControl.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Automation; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ColorFormatEditor.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ColorFormatEditor.xaml.cs index 9ed817d697..76681d8b46 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ColorFormatEditor.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ColorFormatEditor.xaml.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Security.Cryptography; using System.Windows.Input; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml.cs index 405d5d6e7d..de05fe790d 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml.cs @@ -5,6 +5,7 @@ using System.ComponentModel; using System.IO; using System.Text; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs index c013a87f40..82c6b3a986 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml.cs index d746f738ce..24fa76619b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs index 8b19fbf3ba..b863900fe3 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Automation.Peers; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml.cs index 6124356fc7..dca1fbae8e 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.ObjectModel; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs index 3fbcdeef21..e33127572d 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using CommunityToolkit.WinUI; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml.cs index 79059e8aa8..5d44f7c451 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutWithTextLabelControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutWithTextLabelControl.xaml.cs index 66e052da37..ed18669eba 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutWithTextLabelControl.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutWithTextLabelControl.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; + using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml.cs index cc952772a9..b58636f41b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml.cs @@ -4,6 +4,7 @@ using System; using System.Collections.ObjectModel; using System.Threading; + using global::Windows.System; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs index 5c778fbbdd..a2a8b313ac 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; using System.Threading; + using global::Windows.System; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Controls; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs index c665e3a21a..e85d377da2 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using ManagedCommon; using Microsoft.PowerLauncher.Telemetry; using Microsoft.PowerToys.Settings.UI.Helpers; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeColorPicker.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeColorPicker.xaml.cs index 3ed13e6e84..444b2d7295 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeColorPicker.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeColorPicker.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeEnvironmentVariables.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeEnvironmentVariables.xaml.cs index d02a2f8e1b..af20978b42 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeEnvironmentVariables.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeEnvironmentVariables.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeHosts.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeHosts.xaml.cs index 25dc699889..d47af96c7f 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeHosts.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeHosts.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewPlaceholder.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewPlaceholder.xaml.cs index 18a18189ab..c7767e2424 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewPlaceholder.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewPlaceholder.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading.Tasks; + using AllExperiments; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeRun.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeRun.xaml.cs index 29ed8b72d4..3cb8593922 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeRun.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeRun.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml.cs index 09186b4634..02df4de735 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Collections.ObjectModel; using System.Globalization; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs index 11b8b678f9..5702ddcb9f 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs index d5cece086b..760b4acaa1 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs @@ -13,6 +13,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Text.RegularExpressions; using System.Threading.Tasks; + using CommunityToolkit.WinUI.UI.Controls; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs index 7fb66e711e..ac8c3168b7 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.Views; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml.cs index d24d13dabc..a395ac767b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml.cs @@ -6,6 +6,7 @@ using System; using System.Linq; using System.Threading.Tasks; using System.Windows.Input; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs index 25822b303e..b30ff66844 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.IO; using System.IO.Abstractions; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml.cs index d3c8cc0759..abb53f2b8f 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Windows.Input; + using CommunityToolkit.WinUI.Controls; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs index 4130f94f8a..394b1d6de6 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Threading; using System.Threading.Tasks; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs index 139ecef57c..bdcce77c5a 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Threading; using System.Threading.Tasks; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ImageResizerPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/ImageResizerPage.xaml.cs index cd5aedb792..e2dd14f2ad 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ImageResizerPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ImageResizerPage.xaml.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml.cs index 9d84968206..4aa0e9a31b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO.Abstractions; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Utilities; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml.cs index 691d8a0413..49d4cfce30 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseWithoutBordersPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseWithoutBordersPage.xaml.cs index 1eb2cf5064..989bd9f0c6 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseWithoutBordersPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseWithoutBordersPage.xaml.cs @@ -6,6 +6,7 @@ using System; using System.IO.Abstractions; using System.Threading.Tasks; using System.Windows.Input; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Utilities; @@ -15,6 +16,7 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; using Windows.ApplicationModel.DataTransfer; using WinRT; + using static Microsoft.PowerToys.Settings.UI.ViewModels.MouseWithoutBordersViewModel; namespace Microsoft.PowerToys.Settings.UI.Views diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml.cs index f33e7b0d4a..78e2fa948f 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using System.Windows; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml.cs index 81ba63fcd1..3e272e0eb6 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Collections.ObjectModel; using System.IO; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs index 4a5f66c11a..eac8029b2e 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Services; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/VideoConference.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/VideoConference.xaml.cs index 9cf7b71cd7..2768994933 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/VideoConference.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/VideoConference.xaml.cs @@ -5,6 +5,7 @@ using System; using System.Runtime.InteropServices; using System.Threading.Tasks; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; diff --git a/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs index 7790460bb5..94787ae513 100644 --- a/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs @@ -13,6 +13,7 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization; using System.Timers; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs index 97409f376c..a45c66a1ef 100644 --- a/src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Runtime.CompilerServices; using System.Text.Json; + using Common.UI; using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs index 7d9a48c628..2042015717 100644 --- a/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; + using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs index 458ed443d6..f0fd6a4ab8 100644 --- a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs index a1f57d4fc3..4f59ed6e03 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Linq; using System.Text.Json; using System.Timers; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/CropAndLockViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/CropAndLockViewModel.cs index e855174e25..9064cd9058 100644 --- a/src/settings-ui/Settings.UI/ViewModels/CropAndLockViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/CropAndLockViewModel.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Runtime.CompilerServices; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs index c7c304388f..03843a8d8c 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs @@ -6,6 +6,7 @@ using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Runtime.CompilerServices; + using ManagedCommon; using Microsoft.UI; using Windows.UI; diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardModuleItem.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardModuleItem.cs index 5032abe999..fe029e6619 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardModuleItem.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardModuleItem.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; + using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.UI.Xaml; using Windows.UI; diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs index 7884a0994f..388a9f84ec 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs @@ -8,6 +8,7 @@ using System.Collections.ObjectModel; using System.IO.Abstractions; using System.Linq; using System.Windows.Threading; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/EnvironmentVariablesViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/EnvironmentVariablesViewModel.cs index 7a7960cff7..636d88d1ca 100644 --- a/src/settings-ui/Settings.UI/ViewModels/EnvironmentVariablesViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/EnvironmentVariablesViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/FancyZonesViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/FancyZonesViewModel.cs index 89d1c95ff3..2b01dc3cec 100644 --- a/src/settings-ui/Settings.UI/ViewModels/FancyZonesViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/FancyZonesViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; + using Common.UI; using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/FileLocksmithViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/FileLocksmithViewModel.cs index c79a42d83c..19175dba9a 100644 --- a/src/settings-ui/Settings.UI/ViewModels/FileLocksmithViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/FileLocksmithViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Globalization; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/Flyout/AllAppsViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/Flyout/AllAppsViewModel.cs index a0cefee149..58d1f4f9ce 100644 --- a/src/settings-ui/Settings.UI/ViewModels/Flyout/AllAppsViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/Flyout/AllAppsViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.ObjectModel; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/Flyout/FlyoutMenuItem.cs b/src/settings-ui/Settings.UI/ViewModels/Flyout/FlyoutMenuItem.cs index 8bf4482e78..8493834f0f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/Flyout/FlyoutMenuItem.cs +++ b/src/settings-ui/Settings.UI/ViewModels/Flyout/FlyoutMenuItem.cs @@ -5,6 +5,7 @@ using System; using System.ComponentModel; using System.Runtime.CompilerServices; + using ManagedCommon; namespace Microsoft.PowerToys.Settings.UI.ViewModels diff --git a/src/settings-ui/Settings.UI/ViewModels/Flyout/LauncherViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/Flyout/LauncherViewModel.cs index ad24c17428..c1d820c0d7 100644 --- a/src/settings-ui/Settings.UI/ViewModels/Flyout/LauncherViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/Flyout/LauncherViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.ObjectModel; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs index 4f6ff3cb38..25f8b6ef3f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Text.Json; using System.Threading.Tasks; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/HostsViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/HostsViewModel.cs index 235ae42bd6..c15d8f9306 100644 --- a/src/settings-ui/Settings.UI/ViewModels/HostsViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/HostsViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/ImageResizerViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ImageResizerViewModel.cs index c0ae29ed59..dcd8db95f1 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ImageResizerViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ImageResizerViewModel.cs @@ -7,6 +7,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.IO; using System.Linq; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/KeyboardManagerViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/KeyboardManagerViewModel.cs index 037761c5f8..822df0d6f1 100644 --- a/src/settings-ui/Settings.UI/ViewModels/KeyboardManagerViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/KeyboardManagerViewModel.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Input; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/MeasureToolViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/MeasureToolViewModel.cs index 5257c677c5..6c8ee50535 100644 --- a/src/settings-ui/Settings.UI/ViewModels/MeasureToolViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/MeasureToolViewModel.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Runtime.CompilerServices; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs index 2ad31341c2..5533a6f04f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs @@ -5,6 +5,7 @@ using System; using System.ComponentModel; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs index bc9eb69c12..6e71752b30 100644 --- a/src/settings-ui/Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/MouseWithoutBordersViewModel.cs @@ -13,6 +13,7 @@ using System.Runtime.CompilerServices; using System.Text.Json; using System.Threading; using System.Threading.Tasks; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs index 1a92af09da..11e3d3ee46 100644 --- a/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/NewPlusViewModel.cs @@ -10,6 +10,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using System.Windows; + using Common.UI; using global::PowerToys.GPOWrapper; using ManagedCommon; @@ -21,6 +22,7 @@ using Microsoft.PowerToys.Settings.UI.Library.Utilities; using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands; using Windows.ApplicationModel.VoiceCommands; using Windows.System; + using static Microsoft.PowerToys.Settings.UI.Helpers.ShellGetFolder; namespace Microsoft.PowerToys.Settings.UI.ViewModels diff --git a/src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs index 4672d0dabf..b3e6483e6c 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PeekViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Globalization; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs index 02b83228c7..c77d2c0596 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Runtime.CompilerServices; + using Microsoft.PowerToys.Settings.UI.Library; namespace Microsoft.PowerToys.Settings.UI.ViewModels diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs index 99ef36afb9..75097ae2de 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Enumerations; diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerLauncherPluginViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerLauncherPluginViewModel.cs index c350222c35..f8cc3b46f1 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerLauncherPluginViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerLauncherPluginViewModel.cs @@ -8,6 +8,7 @@ using System.ComponentModel; using System.IO; using System.Linq; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs index 9bb10b8d2f..ee0781ce91 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerLauncherViewModel.cs @@ -10,6 +10,7 @@ using System.Linq; using System.Runtime.CompilerServices; using System.Text.Json; using System.Windows.Input; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs index a52924860b..3751f6a377 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Linq; using System.Text.Json; using System.Timers; + using Common.UI; using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs index fa494f6cd5..3c8904803f 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerRenameViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerRenameViewModel.cs index 602c16cf6b..00616bd678 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerRenameViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerRenameViewModel.cs @@ -5,6 +5,7 @@ using System; using System.IO; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; diff --git a/src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs index 77a2e5c870..f6edc99524 100644 --- a/src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Globalization; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/ShellViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ShellViewModel.cs index b222c4ddf9..f02127ea38 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ShellViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ShellViewModel.cs @@ -9,6 +9,7 @@ using System.IO.Abstractions; using System.Linq; using System.Threading.Tasks; using System.Windows.Input; + using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library.Helpers; using Microsoft.PowerToys.Settings.UI.Services; diff --git a/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs index 1ec77c81dc..e98b62dea4 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/VideoConferenceViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/VideoConferenceViewModel.cs index b3abc2a215..21d3a7eb92 100644 --- a/src/settings-ui/Settings.UI/ViewModels/VideoConferenceViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/VideoConferenceViewModel.cs @@ -10,6 +10,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text.Json; using System.Threading.Tasks; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; diff --git a/src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs index b3cee17070..ff7ff1bf88 100644 --- a/src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/WorkspacesViewModel.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Runtime.CompilerServices; using System.Text.Json; + using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Helpers; From 2ef987e1d9af49e3627fcc168e9db3b4ad241f6b Mon Sep 17 00:00:00 2001 From: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:11:18 +0200 Subject: [PATCH 32/54] [Chore]Common Logger: Log missing Exception type (#35084) log type for exception and inner exception --- src/common/ManagedCommon/Logger.cs | 31 ++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/common/ManagedCommon/Logger.cs b/src/common/ManagedCommon/Logger.cs index 416a7aa042..bbc2637fd9 100644 --- a/src/common/ManagedCommon/Logger.cs +++ b/src/common/ManagedCommon/Logger.cs @@ -60,14 +60,29 @@ namespace ManagedCommon public static void LogError(string message, Exception ex) { - Log( - message + Environment.NewLine + - ex?.Message + Environment.NewLine + - "Inner exception: " + Environment.NewLine + - ex?.InnerException?.Message + Environment.NewLine + - "Stack trace: " + Environment.NewLine + - ex?.StackTrace, - Error); + if (ex == null) + { + LogError(message); + } + else + { + var exMessage = + message + Environment.NewLine + + ex.GetType() + ": " + ex.Message + Environment.NewLine; + + if (ex.InnerException != null) + { + exMessage += + "Inner exception: " + Environment.NewLine + + ex.InnerException.GetType() + ": " + ex.InnerException.Message + Environment.NewLine; + } + + exMessage += + "Stack trace: " + Environment.NewLine + + ex.StackTrace; + + Log(exMessage, Error); + } } public static void LogWarning(string message) From 2335501421c11bfbfb0ca4889ea35c23c0ad3042 Mon Sep 17 00:00:00 2001 From: octastylos-pseudodipteros <128853928+octastylos-pseudodipteros@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:37:09 +0200 Subject: [PATCH 33/54] [PTRun][WebSearch]Fix title not displaying the last letter (#35176) --- .../Plugins/Community.PowerToys.Run.Plugin.WebSearch/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Main.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Main.cs index 350f68896a..2021b965df 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Main.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Main.cs @@ -72,7 +72,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch string arguments = "? "; results.Add(new Result { - Title = Properties.Resources.plugin_description.Remove(Description.Length - 1, 1), + Title = Properties.Resources.plugin_description, SubTitle = string.Format(CultureInfo.CurrentCulture, PluginInBrowserName, BrowserInfo.Name ?? BrowserInfo.MSEdgeName), QueryTextDisplay = string.Empty, IcoPath = _iconPath, From 14139affc52179d2a1cc76242455e1bb668c3a93 Mon Sep 17 00:00:00 2001 From: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:09:29 +0200 Subject: [PATCH 34/54] [Settings][QuickAccent]Sort Languages ComboBox (#35462) sort languages --- .../ViewModels/GeneralViewModel.cs | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs index 25f8b6ef3f..adbc6cd0d3 100644 --- a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs @@ -9,7 +9,6 @@ using System.Diagnostics; using System.Globalization; using System.IO; using System.IO.Abstractions; -using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Text.Json; @@ -1083,25 +1082,50 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private void InitializeLanguages() { var lang = LanguageModel.LoadSetting(); - int i = 0; + var selectedLanguageIndex = 0; foreach (var item in langTagsAndIds) { - Languages.Add(new LanguageModel { Tag = item.Key, ResourceID = item.Value, Language = GetResourceString(item.Value) }); + var language = new LanguageModel { Tag = item.Key, ResourceID = item.Value, Language = GetResourceString(item.Value) }; + var index = GetLanguageIndex(language.Language, item.Key == string.Empty); + Languages.Insert(index, language); if (item.Key.Equals(lang, StringComparison.Ordinal)) { - _initLanguagesIndex = i; - LanguagesIndex = i; + selectedLanguageIndex = index; + } + else if (index <= selectedLanguageIndex) + { + selectedLanguageIndex++; } - - i++; } + + _initLanguagesIndex = selectedLanguageIndex; + LanguagesIndex = selectedLanguageIndex; + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Building a user facing list")] + private int GetLanguageIndex(string language, bool isDefault) + { + if (Languages.Count == 0 || isDefault) + { + return 0; + } + + for (var i = 1; i < Languages.Count; i++) + { + if (string.Compare(Languages[i].Language, language, StringComparison.CurrentCultureIgnoreCase) > 0) + { + return i; + } + } + + return Languages.Count; } private void NotifyLanguageChanged() { - OutGoingLanguageSettings outsettings = new OutGoingLanguageSettings(langTagsAndIds.ElementAt(LanguagesIndex).Key); + OutGoingLanguageSettings outsettings = new OutGoingLanguageSettings(Languages[_languagesIndex].Tag); SendConfigMSG(outsettings.ToString()); } From dd5cd2a5708c2f130f1b7d5ce7b2b050ddf6ad58 Mon Sep 17 00:00:00 2001 From: Ani <115020168+drawbyperpetual@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:34:09 +0200 Subject: [PATCH 35/54] [AdvancedPaste]Additional actions - Image to text, Paste as file (txt, png, html) (#35167) * [AdvancedPaste] Additional actions, including Image to text * Spellcheck issue * [AdvancedPaste] Paste as file and many other improvements * Fixed typo * Fixed typo * [AdvancedPaste] Improved paste window menu layout * [AdvancedPaste] Improved settings window layout * [AdvancedPaste] Removed AudioToText for the moment * Code cleanup * Minor fixes * Changed log-line with potentially sensitive info * Extra telemetry for AdvancedPaste * Added 'Hotkey' suffix to AdvancedPaste_Settings telemetry event --- src/common/interop/Constants.cpp | 4 + src/common/interop/Constants.h | 1 + src/common/interop/Constants.idl | 1 + src/common/interop/shared_constants.h | 2 + .../AdvancedPasteXAML/App.xaml.cs | 79 ++-- .../AdvancedPasteXAML/Controls/PromptBox.xaml | 6 +- .../Controls/PromptBox.xaml.cs | 95 ++-- .../PasteFormatsToHeightConverter.cs | 24 + .../AdvancedPasteXAML/MainWindow.xaml | 4 +- .../AdvancedPasteXAML/MainWindow.xaml.cs | 21 +- .../AdvancedPasteXAML/Pages/MainPage.xaml | 98 ++-- .../AdvancedPasteXAML/Pages/MainPage.xaml.cs | 13 +- .../AdvancedPaste/Helpers/ClipboardHelper.cs | 168 +++++-- .../AdvancedPaste/Helpers/IUserSettings.cs | 10 +- .../AdvancedPaste/Helpers/OcrHelpers.cs | 39 ++ .../AdvancedPaste/Helpers/UserSettings.cs | 49 +- .../AdvancedPaste/Models/ClipboardFormat.cs | 18 + .../AdvancedPaste/Models/ClipboardItem.cs | 13 +- .../Models/CustomActionActivatedEventArgs.cs | 6 +- .../Models/PasteActionException.cs | 11 + .../AdvancedPaste/Models/PasteActionSource.cs | 13 + .../AdvancedPaste/Models/PasteFormat.cs | 58 ++- .../Models/PasteFormatMetadataAttribute.cs | 23 + .../AdvancedPaste/Models/PasteFormats.cs | 36 +- .../Services/IPasteFormatExecutor.cs | 13 + .../Services/PasteFormatExecutor.cs | 253 ++++++++++ .../Strings/en-us/Resources.resw | 27 +- .../ViewModels/OptionsViewModel.cs | 435 ++++++++---------- .../AdvancedPasteModuleInterface/dllmain.cpp | 138 +++++- .../AdvancedPasteModuleInterface/trace.cpp | 61 ++- .../AdvancedPasteModuleInterface/trace.h | 4 +- .../AdvancedPasteAdditionalAction.cs | 39 ++ .../AdvancedPasteAdditionalActions.cs | 27 ++ .../AdvancedPasteCustomAction.cs | 69 +-- .../AdvancedPastePasteAsFileAction.cs | 56 +++ .../AdvancedPasteProperties.cs | 7 +- .../Settings.UI.Library/Helpers/Observable.cs | 8 +- .../IAdvancedPasteAction.cs | 12 + .../SettingsXAML/Views/AdvancedPaste.xaml | 65 ++- .../Settings.UI/Strings/en-us/Resources.resw | 18 + .../ViewModels/AdvancedPasteViewModel.cs | 35 +- 41 files changed, 1435 insertions(+), 624 deletions(-) create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/PasteFormatsToHeightConverter.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Helpers/OcrHelpers.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardFormat.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionException.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionSource.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormatMetadataAttribute.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Services/IPasteFormatExecutor.cs create mode 100644 src/modules/AdvancedPaste/AdvancedPaste/Services/PasteFormatExecutor.cs create mode 100644 src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalAction.cs create mode 100644 src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalActions.cs create mode 100644 src/settings-ui/Settings.UI.Library/AdvancedPastePasteAsFileAction.cs create mode 100644 src/settings-ui/Settings.UI.Library/IAdvancedPasteAction.cs diff --git a/src/common/interop/Constants.cpp b/src/common/interop/Constants.cpp index dc4641822b..7a01cd225a 100644 --- a/src/common/interop/Constants.cpp +++ b/src/common/interop/Constants.cpp @@ -63,6 +63,10 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::ADVANCED_PASTE_JSON_MESSAGE; } + hstring Constants::AdvancedPasteAdditionalActionMessage() + { + return CommonSharedConstants::ADVANCED_PASTE_ADDITIONAL_ACTION_MESSAGE; + } hstring Constants::AdvancedPasteCustomActionMessage() { return CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE; diff --git a/src/common/interop/Constants.h b/src/common/interop/Constants.h index b59cd3e62c..09a884e50b 100644 --- a/src/common/interop/Constants.h +++ b/src/common/interop/Constants.h @@ -19,6 +19,7 @@ namespace winrt::PowerToys::Interop::implementation static hstring AdvancedPasteShowUIMessage(); static hstring AdvancedPasteMarkdownMessage(); static hstring AdvancedPasteJsonMessage(); + static hstring AdvancedPasteAdditionalActionMessage(); static hstring AdvancedPasteCustomActionMessage(); static hstring ShowPowerOCRSharedEvent(); static hstring MouseJumpShowPreviewEvent(); diff --git a/src/common/interop/Constants.idl b/src/common/interop/Constants.idl index a681ee5a81..9ae489c62b 100644 --- a/src/common/interop/Constants.idl +++ b/src/common/interop/Constants.idl @@ -16,6 +16,7 @@ namespace PowerToys static String AdvancedPasteShowUIMessage(); static String AdvancedPasteMarkdownMessage(); static String AdvancedPasteJsonMessage(); + static String AdvancedPasteAdditionalActionMessage(); static String AdvancedPasteCustomActionMessage(); static String ShowPowerOCRSharedEvent(); static String MouseJumpShowPreviewEvent(); diff --git a/src/common/interop/shared_constants.h b/src/common/interop/shared_constants.h index 3f9c350b7b..c98b143104 100644 --- a/src/common/interop/shared_constants.h +++ b/src/common/interop/shared_constants.h @@ -32,6 +32,8 @@ namespace CommonSharedConstants const wchar_t ADVANCED_PASTE_JSON_MESSAGE[] = L"PasteJson"; + const wchar_t ADVANCED_PASTE_ADDITIONAL_ACTION_MESSAGE[] = L"AdditionalAction"; + const wchar_t ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE[] = L"CustomAction"; // Path to the event used to show Color Picker diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs index 3f990ef6fa..77f8551803 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs @@ -3,12 +3,16 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Reflection; using System.Threading; using System.Threading.Tasks; using AdvancedPaste.Helpers; +using AdvancedPaste.Models; +using AdvancedPaste.Services; using AdvancedPaste.Settings; using AdvancedPaste.ViewModels; using ManagedCommon; @@ -34,6 +38,13 @@ namespace AdvancedPaste { public IHost Host { get; private set; } + private static readonly Dictionary AdditionalActionIPCKeys = + typeof(PasteFormats).GetFields() + .Where(field => field.IsLiteral) + .Select(field => (Format: (PasteFormats)field.GetRawConstantValue(), field.GetCustomAttribute().IPCKey)) + .Where(field => field.IPCKey != null) + .ToDictionary(field => field.IPCKey, field => field.Format); + private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread(); private readonly OptionsViewModel viewModel; @@ -60,8 +71,10 @@ namespace AdvancedPaste Host = Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder().UseContentRoot(AppContext.BaseDirectory).ConfigureServices((context, services) => { - services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); }).Build(); viewModel = GetService(); @@ -111,35 +124,35 @@ namespace AdvancedPaste private void ProcessNamedPipe(string pipeName) { - void OnMessage(string message) => _dispatcherQueue.TryEnqueue(() => OnNamedPipeMessage(message)); + void OnMessage(string message) => _dispatcherQueue.TryEnqueue(async () => await OnNamedPipeMessage(message)); - Task.Run(async () => - { - var connectTimeout = TimeSpan.FromSeconds(10); - await NamedPipeProcessor.ProcessNamedPipeAsync(pipeName, connectTimeout, OnMessage, CancellationToken.None); - }); + Task.Run(async () => await NamedPipeProcessor.ProcessNamedPipeAsync(pipeName, connectTimeout: TimeSpan.FromSeconds(10), OnMessage, CancellationToken.None)); } - private void OnNamedPipeMessage(string message) + private async Task OnNamedPipeMessage(string message) { var messageParts = message.Split(); var messageType = messageParts.First(); if (messageType == PowerToys.Interop.Constants.AdvancedPasteShowUIMessage()) { - OnAdvancedPasteHotkey(); + await ShowWindow(); } else if (messageType == PowerToys.Interop.Constants.AdvancedPasteMarkdownMessage()) { - OnAdvancedPasteMarkdownHotkey(); + await viewModel.ExecutePasteFormatAsync(PasteFormats.Markdown, PasteActionSource.GlobalKeyboardShortcut); } else if (messageType == PowerToys.Interop.Constants.AdvancedPasteJsonMessage()) { - OnAdvancedPasteJsonHotkey(); + await viewModel.ExecutePasteFormatAsync(PasteFormats.Json, PasteActionSource.GlobalKeyboardShortcut); + } + else if (messageType == PowerToys.Interop.Constants.AdvancedPasteAdditionalActionMessage()) + { + await OnAdvancedPasteAdditionalActionHotkey(messageParts); } else if (messageType == PowerToys.Interop.Constants.AdvancedPasteCustomActionMessage()) { - OnAdvancedPasteCustomActionHotkey(messageParts); + await OnAdvancedPasteCustomActionHotkey(messageParts); } } @@ -148,24 +161,27 @@ namespace AdvancedPaste Logger.LogError("Unhandled exception", e.Exception); } - private void OnAdvancedPasteJsonHotkey() + private async Task OnAdvancedPasteAdditionalActionHotkey(string[] messageParts) { - viewModel.ReadClipboard(); - viewModel.ToJsonFunction(true); + if (messageParts.Length != 2) + { + Logger.LogWarning("Unexpected additional action message"); + } + else + { + if (!AdditionalActionIPCKeys.TryGetValue(messageParts[1], out PasteFormats pasteFormat)) + { + Logger.LogWarning($"Unexpected additional action type {messageParts[1]}"); + } + else + { + await ShowWindow(); + await viewModel.ExecutePasteFormatAsync(pasteFormat, PasteActionSource.GlobalKeyboardShortcut); + } + } } - private void OnAdvancedPasteMarkdownHotkey() - { - viewModel.ReadClipboard(); - viewModel.ToMarkdownFunction(true); - } - - private void OnAdvancedPasteHotkey() - { - ShowWindow(); - } - - private void OnAdvancedPasteCustomActionHotkey(string[] messageParts) + private async Task OnAdvancedPasteCustomActionHotkey(string[] messageParts) { if (messageParts.Length != 2) { @@ -179,16 +195,15 @@ namespace AdvancedPaste } else { - ShowWindow(); - viewModel.ReadClipboard(); - viewModel.ExecuteCustomActionWithPaste(customActionId); + await ShowWindow(); + await viewModel.ExecuteCustomActionAsync(customActionId, PasteActionSource.GlobalKeyboardShortcut); } } } - private void ShowWindow() + private async Task ShowWindow() { - viewModel.OnShow(); + await viewModel.OnShowAsync(); if (window is null) { diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/PromptBox.xaml b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/PromptBox.xaml index 27891312ac..2c0d9ea937 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/PromptBox.xaml +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/PromptBox.xaml @@ -346,7 +346,7 @@ x:Name="InputTxtBox" HorizontalAlignment="Stretch" x:FieldModifier="public" - IsEnabled="{x:Bind ViewModel.IsClipboardDataText, Mode=OneWay}" + IsEnabled="{x:Bind ViewModel.ClipboardHasData, Mode=OneWay}" KeyDown="InputTxtBox_KeyDown" PlaceholderText="{x:Bind ViewModel.InputTxtBoxPlaceholderText, Mode=OneWay}" Style="{StaticResource CustomTextBoxStyle}" @@ -589,7 +589,7 @@ Background="Transparent" Visibility="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}"> - + @@ -638,7 +638,7 @@ FontWeight="SemiBold" Foreground="{ThemeResource SystemFillColorCriticalBrush}" Style="{StaticResource CaptionTextBlockStyle}" - Text="{x:Bind ViewModel.ApiErrorText, Mode=OneWay}" /> + Text="{x:Bind ViewModel.PasteOperationErrorText, Mode=OneWay}" /> (); + InitializeComponent(); ViewModel = App.GetService(); - ViewModel.CustomActionActivated += (_, e) => GenerateCustom(e.ForcePasteCustom); + ViewModel.PropertyChanged += ViewModel_PropertyChanged; + ViewModel.CustomActionActivated += ViewModel_CustomActionActivated; + } + + private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == nameof(ViewModel.Busy) || e.PropertyName == nameof(ViewModel.PasteOperationErrorText)) + { + var state = ViewModel.Busy ? "LoadingState" : string.IsNullOrEmpty(ViewModel.PasteOperationErrorText) ? "DefaultState" : "ErrorState"; + VisualStateManager.GoToState(this, state, true); + } + } + + private void ViewModel_CustomActionActivated(object sender, CustomActionActivatedEventArgs e) + { + Logger.LogTrace(); + + if (!e.PasteResult) + { + PreviewGrid.Width = InputTxtBox.ActualWidth; + PreviewFlyout.ShowAt(InputTxtBox); + } } private void Grid_Loaded(object sender, RoutedEventArgs e) @@ -68,48 +79,7 @@ namespace AdvancedPaste.Controls } [RelayCommand] - private void GenerateCustom() => GenerateCustom(false); - - private void GenerateCustom(bool forcePasteCustom) - { - Logger.LogTrace(); - - VisualStateManager.GoToState(this, "LoadingState", true); - string inputInstructions = ViewModel.Query; - ViewModel.SaveQuery(inputInstructions); - - var customFormatTask = ViewModel.GenerateCustomFunction(inputInstructions); - var delayTask = forcePasteCustom ? Task.Delay(MinTaskTime) : Task.CompletedTask; - Task.WhenAll(customFormatTask, delayTask) - .ContinueWith( - _ => - { - _dispatcherQueue.TryEnqueue(() => - { - ViewModel.CustomFormatResult = customFormatTask.Result; - - if (ViewModel.ApiRequestStatus == (int)HttpStatusCode.OK) - { - VisualStateManager.GoToState(this, "DefaultState", true); - if (_userSettings.ShowCustomPreview && !forcePasteCustom) - { - PreviewGrid.Width = InputTxtBox.ActualWidth; - PreviewFlyout.ShowAt(InputTxtBox); - } - else - { - ViewModel.PasteCustom(); - InputTxtBox.Text = string.Empty; - } - } - else - { - VisualStateManager.GoToState(this, "ErrorState", true); - } - }); - }, - TaskScheduler.Default); - } + private async Task GenerateCustomAsync() => await ViewModel.GenerateCustomFunctionAsync(PasteActionSource.PromptBox); [RelayCommand] private void Recall() @@ -127,29 +97,24 @@ namespace AdvancedPaste.Controls ClipboardHelper.SetClipboardTextContent(lastQuery.ClipboardData); } - private void InputTxtBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e) + private async void InputTxtBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Enter && InputTxtBox.Text.Length > 0 && ViewModel.IsCustomAIEnabled) { - GenerateCustom(); + await GenerateCustomAsync(); } } private void PreviewPasteBtn_Click(object sender, RoutedEventArgs e) { ViewModel.PasteCustom(); - InputTxtBox.Text = string.Empty; } private void ThumbUpDown_Click(object sender, RoutedEventArgs e) { - if (sender is Button btn) + if (sender is Button btn && bool.TryParse(btn.CommandParameter as string, out bool result)) { - bool result; - if (bool.TryParse(btn.CommandParameter as string, out result)) - { - PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteCustomFormatOutputThumbUpDownEvent(result)); - } + PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteCustomFormatOutputThumbUpDownEvent(result)); } } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/PasteFormatsToHeightConverter.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/PasteFormatsToHeightConverter.cs new file mode 100644 index 0000000000..2061bdefc9 --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Converters/PasteFormatsToHeightConverter.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Data; + +namespace AdvancedPaste.Converters; + +public sealed partial class PasteFormatsToHeightConverter : IValueConverter +{ + private const int ItemHeight = 40; + + public int MaxItems { get; set; } = 5; + + public object Convert(object value, Type targetType, object parameter, string language) => + new GridLength(GetHeight((value is ICollection collection) ? collection.Count : (value is int intValue) ? intValue : 0)); + + public int GetHeight(int itemCount) => Math.Min(MaxItems, itemCount) * ItemHeight; + + public object ConvertBack(object value, Type targetType, object parameter, string language) => throw new NotImplementedException(); +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml index 8aa111219c..33a0dec49f 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml @@ -8,9 +8,9 @@ xmlns:pages="using:AdvancedPaste.Pages" xmlns:winuiex="using:WinUIEx" Width="420" - Height="308" + Height="188" MinWidth="420" - MinHeight="308" + MinHeight="188" Closed="WindowEx_Closed" IsAlwaysOnTop="True" IsMaximizable="False" diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs index 314e503ed8..8f675e4d4e 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs @@ -4,9 +4,13 @@ using System; +using System.Linq; +using AdvancedPaste.Converters; using AdvancedPaste.Helpers; +using AdvancedPaste.Models; using AdvancedPaste.Settings; using AdvancedPaste.ViewModels; + using ManagedCommon; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; @@ -24,25 +28,32 @@ namespace AdvancedPaste public MainWindow() { - this.InitializeComponent(); + InitializeComponent(); _userSettings = App.GetService(); + var optionsViewModel = App.GetService(); var baseHeight = MinHeight; + var coreActionCount = PasteFormat.MetadataDict.Values.Count(metadata => metadata.IsCoreAction); void UpdateHeight() { - var trimmedCustomActionCount = optionsViewModel.IsPasteWithAIEnabled ? Math.Min(_userSettings.CustomActions.Count, 5) : 0; - Height = MinHeight = baseHeight + (trimmedCustomActionCount * 40); + double GetHeight(int maxCustomActionCount) => + baseHeight + + new PasteFormatsToHeightConverter().GetHeight(coreActionCount + _userSettings.AdditionalActions.Count) + + new PasteFormatsToHeightConverter() { MaxItems = maxCustomActionCount }.GetHeight(optionsViewModel.IsAIServiceEnabled ? _userSettings.CustomActions.Count : 0); + + MinHeight = GetHeight(1); + Height = GetHeight(5); } UpdateHeight(); - _userSettings.CustomActions.CollectionChanged += (_, _) => UpdateHeight(); + _userSettings.Changed += (_, _) => UpdateHeight(); optionsViewModel.PropertyChanged += (_, e) => { - if (e.PropertyName == nameof(optionsViewModel.IsPasteWithAIEnabled)) + if (e.PropertyName == nameof(optionsViewModel.IsAIServiceEnabled)) { UpdateHeight(); } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml index f45a222866..b4e99ebaed 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml @@ -16,8 +16,9 @@ + + - - - - - - - - - - - - - + @@ -166,9 +186,9 @@ BorderThickness="0,1,0,0" RowSpacing="4"> + - - + @@ -176,12 +196,13 @@ x:Name="PasteOptionsListView" Grid.Row="0" VerticalAlignment="Bottom" - IsEnabled="{x:Bind ViewModel.IsClipboardDataText, Mode=OneWay}" - IsItemClickEnabled="True" - ItemClick="ListView_Click" + IsItemClickEnabled="False" + ItemContainerStyle="{StaticResource PasteFormatListViewItemStyle}" ItemContainerTransitions="{x:Null}" ItemTemplate="{StaticResource PasteFormatTemplate}" ItemsSource="{x:Bind ViewModel.StandardPasteFormats, Mode=OneWay}" + ScrollViewer.VerticalScrollBarVisibility="Visible" + ScrollViewer.VerticalScrollMode="Auto" SelectionMode="None" TabIndex="1" /> @@ -196,9 +217,8 @@ x:Name="CustomActionsListView" Grid.Row="2" VerticalAlignment="Top" - IsEnabled="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay}" - IsItemClickEnabled="True" - ItemClick="ListView_Click" + IsItemClickEnabled="False" + ItemContainerStyle="{StaticResource PasteFormatListViewItemStyle}" ItemContainerTransitions="{x:Null}" ItemTemplate="{StaticResource PasteFormatTemplate}" ItemsSource="{x:Bind ViewModel.CustomActionPasteFormats, Mode=OneWay}" diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml.cs index ab25db1d7c..d3e4ff1829 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Pages/MainPage.xaml.cs @@ -130,15 +130,15 @@ namespace AdvancedPaste.Pages } } - private void ListView_Click(object sender, ItemClickEventArgs e) + private async void ListView_Button_Click(object sender, RoutedEventArgs e) { - if (e.ClickedItem is PasteFormat format) + if (sender is Button { DataContext: PasteFormat format }) { - ViewModel.ExecutePasteFormat(format); + await ViewModel.ExecutePasteFormatAsync(format, PasteActionSource.ContextMenu); } } - private void KeyboardAccelerator_Invoked(Microsoft.UI.Xaml.Input.KeyboardAccelerator sender, Microsoft.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args) + private async void KeyboardAccelerator_Invoked(Microsoft.UI.Xaml.Input.KeyboardAccelerator sender, Microsoft.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args) { if (GetMainWindow()?.Visible is false) { @@ -171,7 +171,7 @@ namespace AdvancedPaste.Pages case VirtualKey.Number7: case VirtualKey.Number8: case VirtualKey.Number9: - ViewModel.ExecutePasteFormat(sender.Key); + await ViewModel.ExecutePasteFormatAsync(sender.Key); break; default: @@ -199,8 +199,7 @@ namespace AdvancedPaste.Pages } else if (item.Image is not null) { - RandomAccessStreamReference image = null; - image = await item.Item.Content.GetBitmapAsync(); + RandomAccessStreamReference image = await item.Item.Content.GetBitmapAsync(); ClipboardHelper.SetClipboardImageContent(image); } } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/ClipboardHelper.cs b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/ClipboardHelper.cs index 4c1bf5b24e..9ec1dd1618 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/ClipboardHelper.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/ClipboardHelper.cs @@ -3,12 +3,16 @@ // See the LICENSE file in the project root for more information. using System; -using System.Threading; +using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; +using AdvancedPaste.Models; using ManagedCommon; -using Microsoft.UI.Xaml.Media.Imaging; using Windows.ApplicationModel.DataTransfer; +using Windows.Data.Html; +using Windows.Graphics.Imaging; +using Windows.Storage; using Windows.Storage.Streams; using Windows.System; @@ -16,6 +20,34 @@ namespace AdvancedPaste.Helpers { internal static class ClipboardHelper { + private static readonly HashSet ImageFileTypes = new(StringComparer.InvariantCultureIgnoreCase) { ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".ico", ".svg" }; + + private static readonly (string DataFormat, ClipboardFormat ClipboardFormat)[] DataFormats = + [ + (StandardDataFormats.Text, ClipboardFormat.Text), + (StandardDataFormats.Html, ClipboardFormat.Html), + (StandardDataFormats.Bitmap, ClipboardFormat.Image), + ]; + + internal static async Task GetAvailableClipboardFormatsAsync(DataPackageView clipboardData) + { + var availableClipboardFormats = DataFormats.Aggregate( + ClipboardFormat.None, + (result, formatPair) => clipboardData.Contains(formatPair.DataFormat) ? (result | formatPair.ClipboardFormat) : result); + + if (clipboardData.Contains(StandardDataFormats.StorageItems)) + { + var storageItems = await clipboardData.GetStorageItemsAsync(); + + if (storageItems.Count == 1 && storageItems.Single() is StorageFile file && ImageFileTypes.Contains(file.FileType)) + { + availableClipboardFormats |= ClipboardFormat.ImageFile; + } + } + + return availableClipboardFormats; + } + internal static void SetClipboardTextContent(string text) { Logger.LogTrace(); @@ -26,31 +58,45 @@ namespace AdvancedPaste.Helpers output.SetText(text); Clipboard.SetContentWithOptions(output, null); - // TODO(stefan): For some reason Flush() fails from time to time when directly activated via hotkey. - // Calling inside a loop makes it work. - bool flushed = false; - for (int i = 0; i < 5; i++) + Flush(); + } + } + + private static bool Flush() + { + // TODO(stefan): For some reason Flush() fails from time to time when directly activated via hotkey. + // Calling inside a loop makes it work. + const int maxAttempts = 5; + for (int i = 1; i <= maxAttempts; i++) + { + try { - if (flushed) + Task.Run(Clipboard.Flush).Wait(); + return true; + } + catch (Exception ex) + { + if (i == maxAttempts) { - break; - } - - try - { - Task.Run(() => - { - Clipboard.Flush(); - }).Wait(); - - flushed = true; - } - catch (Exception ex) - { - Logger.LogError("Clipboard.Flush() failed", ex); + Logger.LogError($"{nameof(Clipboard)}.{nameof(Flush)}() failed", ex); } } } + + return false; + } + + private static async Task FlushAsync() => await Task.Run(Flush); + + internal static async Task SetClipboardFileContentAsync(string fileName) + { + var storageFile = await StorageFile.GetFileFromPathAsync(fileName); + + DataPackage output = new(); + output.SetStorageItems([storageFile]); + Clipboard.SetContent(output); + + await FlushAsync(); } internal static void SetClipboardImageContent(RandomAccessStreamReference image) @@ -63,30 +109,7 @@ namespace AdvancedPaste.Helpers output.SetBitmap(image); Clipboard.SetContentWithOptions(output, null); - // TODO(stefan): For some reason Flush() fails from time to time when directly activated via hotkey. - // Calling inside a loop makes it work. - bool flushed = false; - for (int i = 0; i < 5; i++) - { - if (flushed) - { - break; - } - - try - { - Task.Run(() => - { - Clipboard.Flush(); - }).Wait(); - - flushed = true; - } - catch (Exception ex) - { - Logger.LogError("Clipboard.Flush() failed", ex); - } - } + Flush(); } } @@ -136,5 +159,58 @@ namespace AdvancedPaste.Helpers Logger.LogInfo("Paste sent"); } + + internal static async Task GetClipboardTextOrHtmlTextAsync(DataPackageView clipboardData) + { + if (clipboardData.Contains(StandardDataFormats.Text)) + { + return await clipboardData.GetTextAsync(); + } + else if (clipboardData.Contains(StandardDataFormats.Html)) + { + var html = await clipboardData.GetHtmlFormatAsync(); + return HtmlUtilities.ConvertToText(html); + } + else + { + return string.Empty; + } + } + + internal static async Task GetClipboardHtmlContentAsync(DataPackageView clipboardData) => + clipboardData.Contains(StandardDataFormats.Html) ? await clipboardData.GetHtmlFormatAsync() : string.Empty; + + internal static async Task GetClipboardImageContentAsync(DataPackageView clipboardData) + { + using var stream = await GetClipboardImageStreamAsync(clipboardData); + if (stream != null) + { + var decoder = await BitmapDecoder.CreateAsync(stream); + return await decoder.GetSoftwareBitmapAsync(); + } + + return null; + } + + private static async Task GetClipboardImageStreamAsync(DataPackageView clipboardData) + { + if (clipboardData.Contains(StandardDataFormats.StorageItems)) + { + var storageItems = await clipboardData.GetStorageItemsAsync(); + var file = storageItems.Count == 1 ? storageItems[0] as StorageFile : null; + if (file != null) + { + return await file.OpenReadAsync(); + } + } + + if (clipboardData.Contains(StandardDataFormats.Bitmap)) + { + var bitmap = await clipboardData.GetBitmapAsync(); + return await bitmap.OpenReadAsync(); + } + + return null; + } } } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/IUserSettings.cs b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/IUserSettings.cs index fd72f67262..49dbfda945 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/IUserSettings.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/IUserSettings.cs @@ -2,8 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.ObjectModel; +using System; +using System.Collections.Generic; +using AdvancedPaste.Models; using Microsoft.PowerToys.Settings.UI.Library; namespace AdvancedPaste.Settings @@ -16,6 +18,10 @@ namespace AdvancedPaste.Settings public bool CloseAfterLosingFocus { get; } - public ObservableCollection CustomActions { get; } + public IReadOnlyList CustomActions { get; } + + public IReadOnlyList AdditionalActions { get; } + + public event EventHandler Changed; } } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/OcrHelpers.cs b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/OcrHelpers.cs new file mode 100644 index 0000000000..25b46fd160 --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/OcrHelpers.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using System.Threading.Tasks; +using Windows.Globalization; +using Windows.Graphics.Imaging; +using Windows.Media.Ocr; +using Windows.System.UserProfile; + +namespace AdvancedPaste.Helpers; + +public static class OcrHelpers +{ + public static async Task ExtractTextAsync(SoftwareBitmap bitmap) + { + var ocrLanguage = GetOCRLanguage() ?? throw new InvalidOperationException("Unable to determine OCR language"); + + var ocrEngine = OcrEngine.TryCreateFromLanguage(ocrLanguage) ?? throw new InvalidOperationException("Unable to create OCR engine"); + var ocrResult = await ocrEngine.RecognizeAsync(bitmap); + + return ocrResult.Text; + } + + private static Language GetOCRLanguage() + { + var userLanguageTags = GlobalizationPreferences.Languages.ToList(); + + var languages = from language in OcrEngine.AvailableRecognizerLanguages + let tag = language.LanguageTag + where userLanguageTags.Contains(tag) + orderby userLanguageTags.IndexOf(tag) + select language; + + return languages.FirstOrDefault(); + } +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/UserSettings.cs b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/UserSettings.cs index 0bfb50c898..fe60dd7f53 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Helpers/UserSettings.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Helpers/UserSettings.cs @@ -3,11 +3,13 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections.ObjectModel; +using System.Collections.Generic; using System.IO.Abstractions; +using System.Linq; using System.Threading; using System.Threading.Tasks; +using AdvancedPaste.Models; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.Utilities; @@ -20,6 +22,8 @@ namespace AdvancedPaste.Settings private readonly TaskScheduler _taskScheduler; private readonly IFileSystemWatcher _watcher; private readonly object _loadingSettingsLock = new(); + private readonly List _additionalActions; + private readonly List _customActions; private const string AdvancedPasteModuleName = "AdvancedPaste"; private const int MaxNumberOfRetry = 5; @@ -27,13 +31,17 @@ namespace AdvancedPaste.Settings private bool _disposedValue; private CancellationTokenSource _cancellationTokenSource; + public event EventHandler Changed; + public bool ShowCustomPreview { get; private set; } public bool SendPasteKeyCombination { get; private set; } public bool CloseAfterLosingFocus { get; private set; } - public ObservableCollection CustomActions { get; private set; } + public IReadOnlyList AdditionalActions => _additionalActions; + + public IReadOnlyList CustomActions => _customActions; public UserSettings() { @@ -42,8 +50,8 @@ namespace AdvancedPaste.Settings ShowCustomPreview = true; SendPasteKeyCombination = true; CloseAfterLosingFocus = false; - CustomActions = []; - + _additionalActions = []; + _customActions = []; _taskScheduler = TaskScheduler.FromCurrentSynchronizationContext(); LoadSettingsFromJson(); @@ -88,18 +96,29 @@ namespace AdvancedPaste.Settings { void UpdateSettings() { - ShowCustomPreview = settings.Properties.ShowCustomPreview; - SendPasteKeyCombination = settings.Properties.SendPasteKeyCombination; - CloseAfterLosingFocus = settings.Properties.CloseAfterLosingFocus; + var properties = settings.Properties; - CustomActions.Clear(); - foreach (var customAction in settings.Properties.CustomActions.Value) - { - if (customAction.IsShown && customAction.IsValid) - { - CustomActions.Add(customAction); - } - } + ShowCustomPreview = properties.ShowCustomPreview; + SendPasteKeyCombination = properties.SendPasteKeyCombination; + CloseAfterLosingFocus = properties.CloseAfterLosingFocus; + + var sourceAdditionalActions = properties.AdditionalActions; + (PasteFormats Format, IAdvancedPasteAction[] Actions)[] additionalActionFormats = + [ + (PasteFormats.ImageToText, [sourceAdditionalActions.ImageToText]), + (PasteFormats.PasteAsTxtFile, [sourceAdditionalActions.PasteAsFile, sourceAdditionalActions.PasteAsFile.PasteAsTxtFile]), + (PasteFormats.PasteAsPngFile, [sourceAdditionalActions.PasteAsFile, sourceAdditionalActions.PasteAsFile.PasteAsPngFile]), + (PasteFormats.PasteAsHtmlFile, [sourceAdditionalActions.PasteAsFile, sourceAdditionalActions.PasteAsFile.PasteAsHtmlFile]) + ]; + + _additionalActions.Clear(); + _additionalActions.AddRange(additionalActionFormats.Where(tuple => tuple.Actions.All(action => action.IsShown)) + .Select(tuple => tuple.Format)); + + _customActions.Clear(); + _customActions.AddRange(properties.CustomActions.Value.Where(customAction => customAction.IsShown && customAction.IsValid)); + + Changed?.Invoke(this, EventArgs.Empty); } Task.Factory diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardFormat.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardFormat.cs new file mode 100644 index 0000000000..a63e79735e --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardFormat.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace AdvancedPaste.Models; + +[Flags] +public enum ClipboardFormat +{ + None, + Text = 1 << 0, + Html = 1 << 1, + Audio = 1 << 2, + Image = 1 << 3, + ImageFile = 1 << 4, +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardItem.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardItem.cs index 1ff749753e..3927949064 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardItem.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/ClipboardItem.cs @@ -5,14 +5,13 @@ using Microsoft.UI.Xaml.Media.Imaging; using Windows.ApplicationModel.DataTransfer; -namespace AdvancedPaste.Models +namespace AdvancedPaste.Models; + +public class ClipboardItem { - public class ClipboardItem - { - public string Content { get; set; } + public string Content { get; set; } - public ClipboardHistoryItem Item { get; set; } + public ClipboardHistoryItem Item { get; set; } - public BitmapImage Image { get; set; } - } + public BitmapImage Image { get; set; } } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/CustomActionActivatedEventArgs.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/CustomActionActivatedEventArgs.cs index d321cb01f6..d4846e01be 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Models/CustomActionActivatedEventArgs.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/CustomActionActivatedEventArgs.cs @@ -6,9 +6,9 @@ using System; namespace AdvancedPaste.Models; -public sealed class CustomActionActivatedEventArgs(string text, bool forcePasteCustom) : EventArgs +public sealed class CustomActionActivatedEventArgs(string text, bool pasteResult) : EventArgs { - public string Text { get; private set; } = text; + public string Text { get; private init; } = text; - public bool ForcePasteCustom { get; private set; } = forcePasteCustom; + public bool PasteResult { get; private init; } = pasteResult; } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionException.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionException.cs new file mode 100644 index 0000000000..fed4e24c50 --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionException.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace AdvancedPaste.Models; + +public sealed class PasteActionException(string message) : Exception(message) +{ +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionSource.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionSource.cs new file mode 100644 index 0000000000..bdfabfbcc3 --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteActionSource.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace AdvancedPaste.Models; + +public enum PasteActionSource +{ + ContextMenu, + InAppKeyboardShortcut, + GlobalKeyboardShortcut, + PromptBox, +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormat.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormat.cs index 6f5103be3e..c38a54b843 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormat.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormat.cs @@ -2,38 +2,62 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using CommunityToolkit.Mvvm.ComponentModel; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; using Microsoft.PowerToys.Settings.UI.Library; namespace AdvancedPaste.Models; -public partial class PasteFormat : ObservableObject +[DebuggerDisplay("{Name} IsEnabled={IsEnabled} ShortcutText={ShortcutText}")] +public sealed class PasteFormat { - [ObservableProperty] - private string _shortcutText = string.Empty; + public static readonly IReadOnlyDictionary MetadataDict = + typeof(PasteFormats).GetFields() + .Where(field => field.IsLiteral) + .ToDictionary(field => (PasteFormats)field.GetRawConstantValue(), field => field.GetCustomAttribute()); - [ObservableProperty] - private string _toolTip = string.Empty; - - public PasteFormat() + private PasteFormat(PasteFormats format, ClipboardFormat clipboardFormats, bool isAIServiceEnabled) { + Format = format; + IsEnabled = SupportsClipboardFormats(clipboardFormats) && (isAIServiceEnabled || !Metadata.RequiresAIService); } - public PasteFormat(AdvancedPasteCustomAction customAction, string shortcutText) + public PasteFormat(PasteFormats format, ClipboardFormat clipboardFormats, bool isAIServiceEnabled, Func resourceLoader) + : this(format, clipboardFormats, isAIServiceEnabled) + { + Name = Metadata.ResourceId == null ? string.Empty : resourceLoader(Metadata.ResourceId); + Prompt = string.Empty; + } + + public PasteFormat(AdvancedPasteCustomAction customAction, ClipboardFormat clipboardFormats, bool isAIServiceEnabled) + : this(PasteFormats.Custom, clipboardFormats, isAIServiceEnabled) { - IconGlyph = "\uE945"; Name = customAction.Name; Prompt = customAction.Prompt; - Format = PasteFormats.Custom; - ShortcutText = shortcutText; - ToolTip = customAction.Prompt; } - public string IconGlyph { get; init; } + public PasteFormatMetadataAttribute Metadata => MetadataDict[Format]; - public string Name { get; init; } + public string IconGlyph => Metadata.IconGlyph; - public PasteFormats Format { get; init; } + public string Name { get; private init; } - public string Prompt { get; init; } = string.Empty; + public PasteFormats Format { get; private init; } + + public string Prompt { get; private init; } + + public bool IsEnabled { get; private init; } + + public double Opacity => IsEnabled ? 1 : 0.5; + + public string ToolTip => string.IsNullOrEmpty(Prompt) ? $"{Name} ({ShortcutText})" : Prompt; + + public string Query => string.IsNullOrEmpty(Prompt) ? Name : Prompt; + + public string ShortcutText { get; set; } = string.Empty; + + public bool SupportsClipboardFormats(ClipboardFormat clipboardFormats) => (clipboardFormats & Metadata.SupportedClipboardFormats) != ClipboardFormat.None; } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormatMetadataAttribute.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormatMetadataAttribute.cs new file mode 100644 index 0000000000..cb3a8a954e --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormatMetadataAttribute.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace AdvancedPaste.Models; + +[AttributeUsage(AttributeTargets.Field)] +public sealed class PasteFormatMetadataAttribute : Attribute +{ + public bool IsCoreAction { get; init; } + + public string ResourceId { get; init; } + + public string IconGlyph { get; init; } + + public bool RequiresAIService { get; init; } + + public ClipboardFormat SupportedClipboardFormats { get; init; } + + public string IPCKey { get; init; } +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormats.cs b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormats.cs index ba48fe6586..fe710d5410 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormats.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormats.cs @@ -2,13 +2,33 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace AdvancedPaste.Models +using Microsoft.PowerToys.Settings.UI.Library; + +namespace AdvancedPaste.Models; + +public enum PasteFormats { - public enum PasteFormats - { - PlainText, - Markdown, - Json, - Custom, - } + [PasteFormatMetadata(IsCoreAction = true, ResourceId = "PasteAsPlainText", IconGlyph = "\uE8E9", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Text)] + PlainText, + + [PasteFormatMetadata(IsCoreAction = true, ResourceId = "PasteAsMarkdown", IconGlyph = "\ue8a5", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Text)] + Markdown, + + [PasteFormatMetadata(IsCoreAction = true, ResourceId = "PasteAsJson", IconGlyph = "\uE943", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Text)] + Json, + + [PasteFormatMetadata(IsCoreAction = false, ResourceId = "ImageToText", IconGlyph = "\uE91B", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Image | ClipboardFormat.ImageFile, IPCKey = AdvancedPasteAdditionalActions.PropertyNames.ImageToText)] + ImageToText, + + [PasteFormatMetadata(IsCoreAction = false, ResourceId = "PasteAsTxtFile", IconGlyph = "\uE8D2", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Text | ClipboardFormat.Html, IPCKey = AdvancedPastePasteAsFileAction.PropertyNames.PasteAsTxtFile)] + PasteAsTxtFile, + + [PasteFormatMetadata(IsCoreAction = false, ResourceId = "PasteAsPngFile", IconGlyph = "\uE8B9", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Image | ClipboardFormat.ImageFile, IPCKey = AdvancedPastePasteAsFileAction.PropertyNames.PasteAsPngFile)] + PasteAsPngFile, + + [PasteFormatMetadata(IsCoreAction = false, ResourceId = "PasteAsHtmlFile", IconGlyph = "\uF6FA", RequiresAIService = false, SupportedClipboardFormats = ClipboardFormat.Html, IPCKey = AdvancedPastePasteAsFileAction.PropertyNames.PasteAsHtmlFile)] + PasteAsHtmlFile, + + [PasteFormatMetadata(IsCoreAction = false, IconGlyph = "\uE945", RequiresAIService = true, SupportedClipboardFormats = ClipboardFormat.Text)] + Custom, } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Services/IPasteFormatExecutor.cs b/src/modules/AdvancedPaste/AdvancedPaste/Services/IPasteFormatExecutor.cs new file mode 100644 index 0000000000..e0bb39ab7c --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Services/IPasteFormatExecutor.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Threading.Tasks; +using AdvancedPaste.Models; + +namespace AdvancedPaste.Services; + +public interface IPasteFormatExecutor +{ + Task ExecutePasteFormatAsync(PasteFormat pasteFormat, PasteActionSource source); +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Services/PasteFormatExecutor.cs b/src/modules/AdvancedPaste/AdvancedPaste/Services/PasteFormatExecutor.cs new file mode 100644 index 0000000000..f77cf8ef99 --- /dev/null +++ b/src/modules/AdvancedPaste/AdvancedPaste/Services/PasteFormatExecutor.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using System.IO; +using System.Net; +using System.Threading.Tasks; +using AdvancedPaste.Helpers; +using AdvancedPaste.Models; +using ManagedCommon; +using Microsoft.PowerToys.Telemetry; +using Windows.ApplicationModel.DataTransfer; +using Windows.Graphics.Imaging; +using Windows.Storage.Streams; + +namespace AdvancedPaste.Services; + +public sealed class PasteFormatExecutor(AICompletionsHelper aiHelper) : IPasteFormatExecutor +{ + private readonly AICompletionsHelper _aiHelper = aiHelper; + + public async Task ExecutePasteFormatAsync(PasteFormat pasteFormat, PasteActionSource source) + { + if (!pasteFormat.IsEnabled) + { + return null; + } + + WriteTelemetry(pasteFormat.Format, source); + + return await ExecutePasteFormatCoreAsync(pasteFormat, Clipboard.GetContent()); + } + + private async Task ExecutePasteFormatCoreAsync(PasteFormat pasteFormat, DataPackageView clipboardData) + { + switch (pasteFormat.Format) + { + case PasteFormats.PlainText: + ToPlainText(clipboardData); + return null; + + case PasteFormats.Markdown: + ToMarkdown(clipboardData); + return null; + + case PasteFormats.Json: + ToJson(clipboardData); + return null; + + case PasteFormats.ImageToText: + await ImageToTextAsync(clipboardData); + return null; + + case PasteFormats.PasteAsTxtFile: + await ToTxtFileAsync(clipboardData); + return null; + + case PasteFormats.PasteAsPngFile: + await ToPngFileAsync(clipboardData); + return null; + + case PasteFormats.PasteAsHtmlFile: + await ToHtmlFileAsync(clipboardData); + return null; + + case PasteFormats.Custom: + return await ToCustomAsync(pasteFormat.Prompt, clipboardData); + + default: + throw new ArgumentException($"Unknown paste format {pasteFormat.Format}", nameof(pasteFormat)); + } + } + + private static void WriteTelemetry(PasteFormats format, PasteActionSource source) + { + switch (source) + { + case PasteActionSource.ContextMenu: + PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteFormatClickedEvent(format)); + break; + + case PasteActionSource.InAppKeyboardShortcut: + PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(format)); + break; + + case PasteActionSource.GlobalKeyboardShortcut: + case PasteActionSource.PromptBox: + break; // no telemetry yet for these sources + + default: + throw new ArgumentOutOfRangeException(nameof(format)); + } + } + + private void ToPlainText(DataPackageView clipboardData) + { + Logger.LogTrace(); + SetClipboardTextContent(MarkdownHelper.PasteAsPlainTextFromClipboard(clipboardData)); + } + + private void ToMarkdown(DataPackageView clipboardData) + { + Logger.LogTrace(); + SetClipboardTextContent(MarkdownHelper.ToMarkdown(clipboardData)); + } + + private void ToJson(DataPackageView clipboardData) + { + Logger.LogTrace(); + SetClipboardTextContent(JsonHelper.ToJsonFromXmlOrCsv(clipboardData)); + } + + private async Task ImageToTextAsync(DataPackageView clipboardData) + { + Logger.LogTrace(); + + var bitmap = await ClipboardHelper.GetClipboardImageContentAsync(clipboardData); + var text = await OcrHelpers.ExtractTextAsync(bitmap); + SetClipboardTextContent(text); + } + + private async Task ToPngFileAsync(DataPackageView clipboardData) + { + Logger.LogTrace(); + + var clipboardBitmap = await ClipboardHelper.GetClipboardImageContentAsync(clipboardData); + + using var pngStream = new InMemoryRandomAccessStream(); + var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, pngStream); + encoder.SetSoftwareBitmap(clipboardBitmap); + await encoder.FlushAsync(); + + await SetClipboardFileContentAsync(pngStream.AsStreamForRead(), "png"); + } + + private async Task ToTxtFileAsync(DataPackageView clipboardData) + { + Logger.LogTrace(); + + var text = await ClipboardHelper.GetClipboardTextOrHtmlTextAsync(clipboardData); + await SetClipboardFileContentAsync(text, "txt"); + } + + private async Task ToHtmlFileAsync(DataPackageView clipboardData) + { + Logger.LogTrace(); + + var cfHtml = await ClipboardHelper.GetClipboardHtmlContentAsync(clipboardData); + var html = RemoveHtmlMetadata(cfHtml); + + await SetClipboardFileContentAsync(html, "html"); + } + + /// + /// Removes leading CF_HTML metadata from HTML clipboard data. + /// See: https://learn.microsoft.com/en-us/windows/win32/dataxchg/html-clipboard-format + /// + private static string RemoveHtmlMetadata(string cfHtml) + { + int? GetIntTagValue(string tagName) + { + var tagNameWithColon = tagName + ":"; + int tagStartPos = cfHtml.IndexOf(tagNameWithColon, StringComparison.InvariantCulture); + + const int tagValueLength = 10; + return tagStartPos != -1 && int.TryParse(cfHtml.AsSpan(tagStartPos + tagNameWithColon.Length, tagValueLength), CultureInfo.InvariantCulture, out int result) ? result : null; + } + + var startFragmentIndex = GetIntTagValue("StartFragment"); + var endFragmentIndex = GetIntTagValue("EndFragment"); + + return (startFragmentIndex == null || endFragmentIndex == null) ? cfHtml : cfHtml[startFragmentIndex.Value..endFragmentIndex.Value]; + } + + private static async Task SetClipboardFileContentAsync(string data, string fileExtension) + { + if (string.IsNullOrEmpty(data)) + { + throw new ArgumentException($"Empty value in {nameof(SetClipboardFileContentAsync)}", nameof(data)); + } + + var path = GetPasteAsFileTempFilePath(fileExtension); + + await File.WriteAllTextAsync(path, data); + await ClipboardHelper.SetClipboardFileContentAsync(path); + } + + private static async Task SetClipboardFileContentAsync(Stream stream, string fileExtension) + { + var path = GetPasteAsFileTempFilePath(fileExtension); + + using var fileStream = File.Create(path); + await stream.CopyToAsync(fileStream); + + await ClipboardHelper.SetClipboardFileContentAsync(path); + } + + private static string GetPasteAsFileTempFilePath(string fileExtension) + { + var prefix = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsFile_FilePrefix"); + var timestamp = DateTime.Now.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture); + + return Path.Combine(Path.GetTempPath(), $"{prefix}{timestamp}.{fileExtension}"); + } + + private async Task ToCustomAsync(string prompt, DataPackageView clipboardData) + { + Logger.LogTrace(); + + if (string.IsNullOrWhiteSpace(prompt)) + { + return string.Empty; + } + + if (!clipboardData.Contains(StandardDataFormats.Text)) + { + Logger.LogWarning("Clipboard does not contain text data"); + return string.Empty; + } + + var currentClipboardText = await clipboardData.GetTextAsync(); + + if (string.IsNullOrWhiteSpace(currentClipboardText)) + { + Logger.LogWarning("Clipboard has no usable text data"); + return string.Empty; + } + + var aiResponse = await Task.Run(() => _aiHelper.AIFormatString(prompt, currentClipboardText)); + + return aiResponse.ApiRequestStatus == (int)HttpStatusCode.OK + ? aiResponse.Response + : throw new PasteActionException(TranslateErrorText(aiResponse.ApiRequestStatus)); + } + + private void SetClipboardTextContent(string content) + { + if (!string.IsNullOrEmpty(content)) + { + ClipboardHelper.SetClipboardTextContent(content); + } + } + + private static string TranslateErrorText(int apiRequestStatus) => (HttpStatusCode)apiRequestStatus switch + { + HttpStatusCode.TooManyRequests => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyTooManyRequests"), + HttpStatusCode.Unauthorized => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyUnauthorized"), + HttpStatusCode.OK => string.Empty, + _ => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyError") + apiRequestStatus.ToString(CultureInfo.InvariantCulture), + }; +} diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw b/src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw index dd2720732c..0ec81547e2 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw +++ b/src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw @@ -120,9 +120,12 @@ AI can make mistakes. - - Clipboard data is not text + + Clipboard does not contain any usable formats + + Clipboard data is not text + To custom with AI is not enabled @@ -135,6 +138,9 @@ OpenAI request failed with status code: + + An error occurred during the paste operation + Clipboard history @@ -151,7 +157,7 @@ Privacy - Connecting to AI services and generating output.. + Generating output... Paste as JSON @@ -162,6 +168,18 @@ Paste as plain text + + Image to text + + + Paste as .txt file + + + Paste as .png file + + + Paste as .html file + Paste @@ -228,4 +246,7 @@ Ctrl + + PowerToys_Paste_ + \ No newline at end of file diff --git a/src/modules/AdvancedPaste/AdvancedPaste/ViewModels/OptionsViewModel.cs b/src/modules/AdvancedPaste/AdvancedPaste/ViewModels/OptionsViewModel.cs index 4d59e327af..f2e461e47f 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/ViewModels/OptionsViewModel.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/ViewModels/OptionsViewModel.cs @@ -3,21 +3,20 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Globalization; using System.Linq; -using System.Net; using System.Threading.Tasks; using AdvancedPaste.Helpers; using AdvancedPaste.Models; +using AdvancedPaste.Services; using AdvancedPaste.Settings; using Common.UI; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; -using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Xaml; using Microsoft.Win32; using Windows.ApplicationModel.DataTransfer; @@ -28,67 +27,66 @@ using DispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue; namespace AdvancedPaste.ViewModels { - public partial class OptionsViewModel : ObservableObject, IDisposable + public sealed partial class OptionsViewModel : ObservableObject, IDisposable { private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread(); private readonly DispatcherTimer _clipboardTimer; private readonly IUserSettings _userSettings; - private readonly AICompletionsHelper aiHelper; - private readonly App app = App.Current as App; - private readonly PasteFormat[] _allStandardPasteFormats; + private readonly IPasteFormatExecutor _pasteFormatExecutor; + private readonly AICompletionsHelper _aiHelper; public DataPackageView ClipboardData { get; set; } [ObservableProperty] - [NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))] - [NotifyPropertyChangedFor(nameof(GeneralErrorText))] [NotifyPropertyChangedFor(nameof(IsCustomAIEnabled))] - private bool _isClipboardDataText; + [NotifyPropertyChangedFor(nameof(ClipboardHasData))] + [NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))] + [NotifyPropertyChangedFor(nameof(AIDisabledErrorText))] + private ClipboardFormat _availableClipboardFormats; [ObservableProperty] private bool _clipboardHistoryEnabled; [ObservableProperty] - [NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))] - [NotifyPropertyChangedFor(nameof(GeneralErrorText))] - [NotifyPropertyChangedFor(nameof(IsPasteWithAIEnabled))] + [NotifyPropertyChangedFor(nameof(AIDisabledErrorText))] + [NotifyPropertyChangedFor(nameof(IsAIServiceEnabled))] [NotifyPropertyChangedFor(nameof(IsCustomAIEnabled))] private bool _isAllowedByGPO; [ObservableProperty] - [NotifyPropertyChangedFor(nameof(ApiErrorText))] - private int _apiRequestStatus; + private string _pasteOperationErrorText; [ObservableProperty] private string _query = string.Empty; private bool _pasteFormatsDirty; + [ObservableProperty] + private bool _busy; + public ObservableCollection StandardPasteFormats { get; } = []; public ObservableCollection CustomActionPasteFormats { get; } = []; - public bool IsPasteWithAIEnabled => IsAllowedByGPO && aiHelper.IsAIEnabled; + public bool IsAIServiceEnabled => IsAllowedByGPO && _aiHelper.IsAIEnabled; - public bool IsCustomAIEnabled => IsPasteWithAIEnabled && IsClipboardDataText; + public bool IsCustomAIEnabled => IsAIServiceEnabled && ClipboardHasText; + + public bool ClipboardHasData => AvailableClipboardFormats != ClipboardFormat.None; + + private bool ClipboardHasText => AvailableClipboardFormats.HasFlag(ClipboardFormat.Text); + + private bool Visible => GetMainWindow()?.Visible is true; public event EventHandler CustomActionActivated; - public OptionsViewModel(IUserSettings userSettings) + public OptionsViewModel(AICompletionsHelper aiHelper, IUserSettings userSettings, IPasteFormatExecutor pasteFormatExecutor) { - aiHelper = new AICompletionsHelper(); + _aiHelper = aiHelper; _userSettings = userSettings; + _pasteFormatExecutor = pasteFormatExecutor; - ApiRequestStatus = (int)HttpStatusCode.OK; - - _allStandardPasteFormats = - [ - new PasteFormat { IconGlyph = "\uE8E9", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsPlainText"), Format = PasteFormats.PlainText }, - new PasteFormat { IconGlyph = "\ue8a5", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsMarkdown"), Format = PasteFormats.Markdown }, - new PasteFormat { IconGlyph = "\uE943", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsJson"), Format = PasteFormats.Json }, - ]; - - GeneratedResponses = new ObservableCollection(); + GeneratedResponses = []; GeneratedResponses.CollectionChanged += (s, e) => { OnPropertyChanged(nameof(HasMultipleResponses)); @@ -96,28 +94,31 @@ namespace AdvancedPaste.ViewModels }; ClipboardHistoryEnabled = IsClipboardHistoryEnabled(); - ReadClipboard(); UpdateOpenAIKey(); _clipboardTimer = new() { Interval = TimeSpan.FromSeconds(1) }; _clipboardTimer.Tick += ClipboardTimer_Tick; _clipboardTimer.Start(); RefreshPasteFormats(); - _userSettings.CustomActions.CollectionChanged += (_, _) => EnqueueRefreshPasteFormats(); + _userSettings.Changed += (_, _) => EnqueueRefreshPasteFormats(); PropertyChanged += (_, e) => { - if (e.PropertyName == nameof(Query) || e.PropertyName == nameof(IsPasteWithAIEnabled)) + string[] dirtyingProperties = [nameof(Query), nameof(IsAIServiceEnabled), nameof(IsCustomAIEnabled), nameof(AvailableClipboardFormats)]; + + if (dirtyingProperties.Contains(e.PropertyName)) { EnqueueRefreshPasteFormats(); } }; } - private void ClipboardTimer_Tick(object sender, object e) + private static MainWindow GetMainWindow() => (App.Current as App)?.GetMainWindow(); + + private async void ClipboardTimer_Tick(object sender, object e) { - if (app.GetMainWindow()?.Visible is true) + if (Visible) { - ReadClipboard(); + await ReadClipboardAsync(); UpdateAllowedByGPO(); } } @@ -137,10 +138,12 @@ namespace AdvancedPaste.ViewModels }); } + private PasteFormat CreatePasteFormat(PasteFormats format) => new(format, AvailableClipboardFormats, IsAIServiceEnabled, ResourceLoaderInstance.ResourceLoader.GetString); + + private PasteFormat CreatePasteFormat(AdvancedPasteCustomAction customAction) => new(customAction, AvailableClipboardFormats, IsAIServiceEnabled); + private void RefreshPasteFormats() { - bool Filter(string text) => text.Contains(Query, StringComparison.CurrentCultureIgnoreCase); - var ctrlString = ResourceLoaderInstance.ResourceLoader.GetString("CtrlKey"); int shortcutNum = 0; @@ -150,28 +153,33 @@ namespace AdvancedPaste.ViewModels return shortcutNum <= 9 ? $"{ctrlString}+{shortcutNum}" : string.Empty; } - StandardPasteFormats.Clear(); - foreach (var format in _allStandardPasteFormats) + IEnumerable FilterAndSort(IEnumerable pasteFormats) => + from pasteFormat in pasteFormats + let comparison = StringComparison.CurrentCultureIgnoreCase + where pasteFormat.Name.Contains(Query, comparison) || pasteFormat.Prompt.Contains(Query, comparison) + orderby pasteFormat.IsEnabled descending + select pasteFormat; + + void UpdateFormats(ObservableCollection collection, IEnumerable pasteFormats) { - if (Filter(format.Name)) + collection.Clear(); + + foreach (var format in FilterAndSort(pasteFormats)) { - format.ShortcutText = GetNextShortcutText(); - format.ToolTip = $"{format.Name} ({format.ShortcutText})"; - StandardPasteFormats.Add(format); + if (format.IsEnabled) + { + format.ShortcutText = GetNextShortcutText(); + } + + collection.Add(format); } } - CustomActionPasteFormats.Clear(); - if (IsPasteWithAIEnabled) - { - foreach (var customAction in _userSettings.CustomActions) - { - if (Filter(customAction.Name) || Filter(customAction.Prompt)) - { - CustomActionPasteFormats.Add(new PasteFormat(customAction, GetNextShortcutText())); - } - } - } + UpdateFormats(StandardPasteFormats, Enum.GetValues() + .Where(format => PasteFormat.MetadataDict[format].IsCoreAction || _userSettings.AdditionalActions.Contains(format)) + .Select(CreatePasteFormat)); + + UpdateFormats(CustomActionPasteFormats, IsAIServiceEnabled ? _userSettings.CustomActions.Select(CreatePasteFormat) : []); } public void Dispose() @@ -180,26 +188,34 @@ namespace AdvancedPaste.ViewModels GC.SuppressFinalize(this); } - public void ReadClipboard() + public async Task ReadClipboardAsync() { + if (Busy) + { + return; + } + ClipboardData = Clipboard.GetContent(); - IsClipboardDataText = ClipboardData.Contains(StandardDataFormats.Text); + AvailableClipboardFormats = await ClipboardHelper.GetAvailableClipboardFormatsAsync(ClipboardData); } - public void OnShow() + public async Task OnShowAsync() { - ReadClipboard(); + PasteOperationErrorText = string.Empty; + Query = string.Empty; + + await ReadClipboardAsync(); if (UpdateOpenAIKey()) { - app.GetMainWindow()?.StartLoading(); + GetMainWindow()?.StartLoading(); _dispatcherQueue.TryEnqueue(() => { - app.GetMainWindow()?.FinishLoading(aiHelper.IsAIEnabled); + GetMainWindow()?.FinishLoading(_aiHelper.IsAIEnabled); OnPropertyChanged(nameof(InputTxtBoxPlaceholderText)); - OnPropertyChanged(nameof(GeneralErrorText)); - OnPropertyChanged(nameof(IsPasteWithAIEnabled)); + OnPropertyChanged(nameof(AIDisabledErrorText)); + OnPropertyChanged(nameof(IsAIServiceEnabled)); OnPropertyChanged(nameof(IsCustomAIEnabled)); }); } @@ -209,7 +225,7 @@ namespace AdvancedPaste.ViewModels } // List to store generated responses - public ObservableCollection GeneratedResponses { get; set; } = new ObservableCollection(); + public ObservableCollection GeneratedResponses { get; set; } = []; // Index to keep track of the current response private int _currentResponseIndex; @@ -228,30 +244,20 @@ namespace AdvancedPaste.ViewModels } } - public bool HasMultipleResponses - { - get => GeneratedResponses.Count > 1; - } + public bool HasMultipleResponses => GeneratedResponses.Count > 1; public string CurrentIndexDisplay => $"{CurrentResponseIndex + 1}/{GeneratedResponses.Count}"; public string InputTxtBoxPlaceholderText + => ResourceLoaderInstance.ResourceLoader.GetString(ClipboardHasData ? "CustomFormatTextBox/PlaceholderText" : "ClipboardEmptyWarning"); + + public string AIDisabledErrorText { get { - app.GetMainWindow().ClearInputText(); - - return IsClipboardDataText ? ResourceLoaderInstance.ResourceLoader.GetString("CustomFormatTextBox/PlaceholderText") : GeneralErrorText; - } - } - - public string GeneralErrorText - { - get - { - if (!IsClipboardDataText) + if (!ClipboardHasText) { - return ResourceLoaderInstance.ResourceLoader.GetString("ClipboardDataTypeMismatchWarning"); + return ResourceLoaderInstance.ResourceLoader.GetString("ClipboardDataNotTextWarning"); } if (!IsAllowedByGPO) @@ -259,7 +265,7 @@ namespace AdvancedPaste.ViewModels return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIGpoDisabled"); } - if (!aiHelper.IsAIEnabled) + if (!_aiHelper.IsAIEnabled) { return ResourceLoaderInstance.ResourceLoader.GetString("OpenAINotConfigured"); } @@ -270,17 +276,6 @@ namespace AdvancedPaste.ViewModels } } - public string ApiErrorText - { - get => (HttpStatusCode)ApiRequestStatus switch - { - HttpStatusCode.TooManyRequests => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyTooManyRequests"), - HttpStatusCode.Unauthorized => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyUnauthorized"), - HttpStatusCode.OK => string.Empty, - _ => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyError") + ApiRequestStatus.ToString(CultureInfo.InvariantCulture), - }; - } - [ObservableProperty] private string _customFormatResult; @@ -289,9 +284,17 @@ namespace AdvancedPaste.ViewModels { var text = GeneratedResponses.ElementAtOrDefault(CurrentResponseIndex); - if (text != null) + if (!string.IsNullOrEmpty(text)) { - PasteCustomFunction(text); + ClipboardHelper.SetClipboardTextContent(text); + HideWindow(); + + if (_userSettings.SendPasteKeyCombination) + { + ClipboardHelper.SendPasteKeyCombination(); + } + + Query = string.Empty; } } @@ -320,190 +323,120 @@ namespace AdvancedPaste.ViewModels public void OpenSettings() { SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.AdvancedPaste, true); - (App.Current as App).GetMainWindow().Close(); + GetMainWindow()?.Close(); } - private void SetClipboardContentAndHideWindow(string content) + internal async Task ExecutePasteFormatAsync(PasteFormats format, PasteActionSource source) { - if (!string.IsNullOrEmpty(content)) - { - ClipboardHelper.SetClipboardTextContent(content); - } - - if (app.GetMainWindow() != null) - { - Windows.Win32.Foundation.HWND hwnd = (Windows.Win32.Foundation.HWND)app.GetMainWindow().GetWindowHandle(); - Windows.Win32.PInvoke.ShowWindow(hwnd, Windows.Win32.UI.WindowsAndMessaging.SHOW_WINDOW_CMD.SW_HIDE); - } + await ReadClipboardAsync(); + await ExecutePasteFormatAsync(CreatePasteFormat(format), source); } - internal void ToPlainTextFunction() + internal async Task ExecutePasteFormatAsync(PasteFormat pasteFormat, PasteActionSource source) { - try - { - Logger.LogTrace(); - - string outputString = MarkdownHelper.PasteAsPlainTextFromClipboard(ClipboardData); - - SetClipboardContentAndHideWindow(outputString); - - if (_userSettings.SendPasteKeyCombination) - { - ClipboardHelper.SendPasteKeyCombination(); - } - } - catch - { - } - } - - internal void ToMarkdownFunction(bool pasteAlways = false) - { - try - { - Logger.LogTrace(); - - string outputString = MarkdownHelper.ToMarkdown(ClipboardData); - - SetClipboardContentAndHideWindow(outputString); - - if (pasteAlways || _userSettings.SendPasteKeyCombination) - { - ClipboardHelper.SendPasteKeyCombination(); - } - } - catch - { - } - } - - internal void ToJsonFunction(bool pasteAlways = false) - { - try - { - Logger.LogTrace(); - - string jsonText = JsonHelper.ToJsonFromXmlOrCsv(ClipboardData); - - SetClipboardContentAndHideWindow(jsonText); - - if (pasteAlways || _userSettings.SendPasteKeyCombination) - { - ClipboardHelper.SendPasteKeyCombination(); - } - } - catch - { - } - } - - internal void ExecutePasteFormat(VirtualKey key) - { - var index = key - VirtualKey.Number1; - var pasteFormat = StandardPasteFormats.ElementAtOrDefault(index) ?? CustomActionPasteFormats.ElementAtOrDefault(index - StandardPasteFormats.Count); - - if (pasteFormat != null) - { - ExecutePasteFormat(pasteFormat); - PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(pasteFormat.Format)); - } - } - - internal void ExecutePasteFormat(PasteFormat pasteFormat) - { - if (!IsClipboardDataText || (pasteFormat.Format == PasteFormats.Custom && !IsCustomAIEnabled)) + if (Busy) { + Logger.LogWarning($"Execution of {pasteFormat.Format} from {source} suppressed as busy"); return; } - switch (pasteFormat.Format) + if (!pasteFormat.IsEnabled) { - case PasteFormats.PlainText: - ToPlainTextFunction(); - break; + var resourceId = pasteFormat.SupportsClipboardFormats(AvailableClipboardFormats) ? "PasteError" : "ClipboardEmptyWarning"; + PasteOperationErrorText = ResourceLoaderInstance.ResourceLoader.GetString(resourceId); + return; + } - case PasteFormats.Markdown: - ToMarkdownFunction(); - break; + Busy = true; + PasteOperationErrorText = string.Empty; + Query = pasteFormat.Query; - case PasteFormats.Json: - ToJsonFunction(); - break; + if (pasteFormat.Format == PasteFormats.Custom) + { + SaveQuery(Query); + } - case PasteFormats.Custom: - Query = pasteFormat.Prompt; - CustomActionActivated?.Invoke(this, new CustomActionActivatedEventArgs(pasteFormat.Prompt, false)); - break; + try + { + // Minimum time to show busy spinner for AI actions when triggered by global keyboard shortcut. + var aiActionMinTaskTime = TimeSpan.FromSeconds(2); + var delayTask = (Visible && source == PasteActionSource.GlobalKeyboardShortcut) ? Task.Delay(aiActionMinTaskTime) : Task.CompletedTask; + var aiOutput = await _pasteFormatExecutor.ExecutePasteFormatAsync(pasteFormat, source); + + await delayTask; + + if (pasteFormat.Format != PasteFormats.Custom) + { + HideWindow(); + + if (source == PasteActionSource.GlobalKeyboardShortcut || _userSettings.SendPasteKeyCombination) + { + ClipboardHelper.SendPasteKeyCombination(); + } + } + else + { + var pasteResult = source == PasteActionSource.GlobalKeyboardShortcut || !_userSettings.ShowCustomPreview; + + GeneratedResponses.Add(aiOutput); + CurrentResponseIndex = GeneratedResponses.Count - 1; + CustomActionActivated?.Invoke(this, new CustomActionActivatedEventArgs(pasteFormat.Prompt, pasteResult)); + + if (pasteResult) + { + PasteCustom(); + } + } + } + catch (Exception ex) + { + Logger.LogError("Error executing paste format", ex); + PasteOperationErrorText = ex is PasteActionException ? ex.Message : ResourceLoaderInstance.ResourceLoader.GetString("PasteError"); + } + + Busy = false; + } + + internal async Task ExecutePasteFormatAsync(VirtualKey key) + { + var pasteFormat = StandardPasteFormats.Concat(CustomActionPasteFormats) + .Where(pasteFormat => pasteFormat.IsEnabled) + .ElementAtOrDefault(key - VirtualKey.Number1); + + if (pasteFormat != null) + { + await ExecutePasteFormatAsync(pasteFormat, PasteActionSource.InAppKeyboardShortcut); } } - internal void ExecuteCustomActionWithPaste(int customActionId) + internal async Task ExecuteCustomActionAsync(int customActionId, PasteActionSource source) { Logger.LogTrace(); + await ReadClipboardAsync(); + var customAction = _userSettings.CustomActions.FirstOrDefault(customAction => customAction.Id == customActionId); if (customAction != null) { - Query = customAction.Prompt; - CustomActionActivated?.Invoke(this, new CustomActionActivatedEventArgs(customAction.Prompt, true)); + await ExecutePasteFormatAsync(CreatePasteFormat(customAction), source); } } - internal async Task GenerateCustomFunction(string inputInstructions) + internal async Task GenerateCustomFunctionAsync(PasteActionSource triggerSource) { - Logger.LogTrace(); - - if (string.IsNullOrWhiteSpace(inputInstructions) || !IsCustomAIEnabled) - { - return string.Empty; - } - - if (!IsClipboardDataText) - { - Logger.LogWarning("Clipboard does not contain text data"); - return string.Empty; - } - - string currentClipboardText = await Task.Run(async () => - { - try - { - string text = await ClipboardData.GetTextAsync() as string; - return text; - } - catch (Exception) - { - // Couldn't get text from the clipboard. Resume with empty text. - return string.Empty; - } - }); - - if (string.IsNullOrWhiteSpace(currentClipboardText)) - { - Logger.LogWarning("Clipboard has no usable text data"); - return string.Empty; - } - - var aiResponse = await Task.Run(() => aiHelper.AIFormatString(inputInstructions, currentClipboardText)); - - string aiOutput = aiResponse.Response; - ApiRequestStatus = aiResponse.ApiRequestStatus; - - GeneratedResponses.Add(aiOutput); - CurrentResponseIndex = GeneratedResponses.Count - 1; - return aiOutput; + AdvancedPasteCustomAction customAction = new() { Name = "Default", Prompt = Query }; + await ExecutePasteFormatAsync(CreatePasteFormat(customAction), triggerSource); } - internal void PasteCustomFunction(string text) + private void HideWindow() { - Logger.LogTrace(); + var mainWindow = GetMainWindow(); - SetClipboardContentAndHideWindow(text); - - if (_userSettings.SendPasteKeyCombination) + if (mainWindow != null) { - ClipboardHelper.SendPasteKeyCombination(); + Windows.Win32.Foundation.HWND hwnd = (Windows.Win32.Foundation.HWND)mainWindow.GetWindowHandle(); + Windows.Win32.PInvoke.ShowWindow(hwnd, Windows.Win32.UI.WindowsAndMessaging.SHOW_WINDOW_CMD.SW_HIDE); } } @@ -524,11 +457,7 @@ namespace AdvancedPaste.ViewModels return; } - string currentClipboardText = Task.Run(async () => - { - string text = await clipboardData.GetTextAsync() as string; - return text; - }).Result; + var currentClipboardText = Task.Run(async () => await clipboardData.GetTextAsync()).Result; var queryData = new CustomQuery { @@ -536,13 +465,13 @@ namespace AdvancedPaste.ViewModels ClipboardData = currentClipboardText, }; - SettingsUtils utils = new SettingsUtils(); + SettingsUtils utils = new(); utils.SaveSettings(queryData.ToString(), Constants.AdvancedPasteModuleName, Constants.LastQueryJsonFileName); } internal CustomQuery LoadPreviousQuery() { - SettingsUtils utils = new SettingsUtils(); + SettingsUtils utils = new(); var query = utils.GetSettings(Constants.AdvancedPasteModuleName, Constants.LastQueryJsonFileName); return query; } @@ -572,9 +501,9 @@ namespace AdvancedPaste.ViewModels if (IsAllowedByGPO) { - var oldKey = aiHelper.GetKey(); + var oldKey = _aiHelper.GetKey(); var newKey = AICompletionsHelper.LoadOpenAIKey(); - aiHelper.SetOpenAIKey(newKey); + _aiHelper.SetOpenAIKey(newKey); return newKey != oldKey; } diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp index 649342bc2f..4da030d6ba 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp @@ -42,6 +42,7 @@ namespace { const wchar_t JSON_KEY_PROPERTIES[] = L"properties"; const wchar_t JSON_KEY_CUSTOM_ACTIONS[] = L"custom-actions"; + const wchar_t JSON_KEY_ADDITIONAL_ACTIONS[] = L"additional-actions"; const wchar_t JSON_KEY_SHORTCUT[] = L"shortcut"; const wchar_t JSON_KEY_IS_SHOWN[] = L"isShown"; const wchar_t JSON_KEY_ID[] = L"id"; @@ -73,7 +74,6 @@ private: HANDLE m_hProcess; - std::thread create_pipe_thread; std::unique_ptr m_write_pipe; // Time to wait for process to close after sending WM_CLOSE signal @@ -86,8 +86,18 @@ private: Hotkey m_paste_as_markdown_hotkey{}; Hotkey m_paste_as_json_hotkey{}; - std::vector m_custom_action_hotkeys; - std::vector m_custom_action_ids; + template + struct ActionData + { + Id id; + Hotkey hotkey; + }; + + using AdditionalAction = ActionData; + std::vector m_additional_actions; + + using CustomAction = ActionData; + std::vector m_custom_actions; bool m_preview_custom_format_output = true; @@ -166,6 +176,34 @@ private: open_ai_key_exists(); } + static std::wstring kebab_to_pascal_case(const std::wstring& kebab_str) + { + std::wstring result; + bool capitalize_next = true; + + for (const auto ch : kebab_str) + { + if (ch == L'-') + { + capitalize_next = true; + } + else + { + if (capitalize_next) + { + result += std::towupper(ch); + capitalize_next = false; + } + else + { + result += ch; + } + } + } + + return result; + } + bool migrate_data_and_remove_data_file(Hotkey& old_paste_as_plain_hotkey) { const wchar_t OLD_JSON_KEY_ACTIVATION_SHORTCUT[] = L"ActivationShortcut"; @@ -197,6 +235,39 @@ private: return false; } + void process_additional_action(const winrt::hstring& actionName, const winrt::Windows::Data::Json::IJsonValue& actionValue) + { + if (actionValue.ValueType() != winrt::Windows::Data::Json::JsonValueType::Object) + { + return; + } + + const auto action = actionValue.GetObjectW(); + + if (!action.GetNamedBoolean(JSON_KEY_IS_SHOWN, false)) + { + return; + } + + if (action.HasKey(JSON_KEY_SHORTCUT)) + { + const AdditionalAction additionalAction + { + actionName.c_str(), + parse_single_hotkey(action.GetNamedObject(JSON_KEY_SHORTCUT)) + }; + + m_additional_actions.push_back(additionalAction); + } + else + { + for (const auto& [subActionName, subAction] : action) + { + process_additional_action(subActionName, subAction); + } + } + } + void parse_hotkeys(PowerToysSettings::PowerToyValues& settings) { auto settingsObject = settings.get_raw_json(); @@ -239,13 +310,23 @@ private: *hotkey = parse_single_hotkey(keyName, settingsObject); } - m_custom_action_hotkeys.clear(); - m_custom_action_ids.clear(); + m_additional_actions.clear(); + m_custom_actions.clear(); if (settingsObject.HasKey(JSON_KEY_PROPERTIES)) { const auto propertiesObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES); + if (propertiesObject.HasKey(JSON_KEY_ADDITIONAL_ACTIONS)) + { + const auto additionalActions = propertiesObject.GetNamedObject(JSON_KEY_ADDITIONAL_ACTIONS); + + for (const auto& [actionName, additionalAction] : additionalActions) + { + process_additional_action(actionName, additionalAction); + } + } + if (propertiesObject.HasKey(JSON_KEY_CUSTOM_ACTIONS)) { const auto customActions = propertiesObject.GetNamedObject(JSON_KEY_CUSTOM_ACTIONS).GetNamedArray(JSON_KEY_VALUE); @@ -257,8 +338,13 @@ private: if (object.GetNamedBoolean(JSON_KEY_IS_SHOWN, false)) { - m_custom_action_hotkeys.push_back(parse_single_hotkey(object.GetNamedObject(JSON_KEY_SHORTCUT))); - m_custom_action_ids.push_back(static_cast(object.GetNamedNumber(JSON_KEY_ID))); + const CustomAction customActionData + { + static_cast(object.GetNamedNumber(JSON_KEY_ID)), + parse_single_hotkey(object.GetNamedObject(JSON_KEY_SHORTCUT)) + }; + + m_custom_actions.push_back(customActionData); } } } @@ -331,7 +417,7 @@ private: return; } - create_pipe_thread = std::thread([&] { start_named_pipe_server(pipe_name.value()); }); + std::thread create_pipe_thread ([&]{ start_named_pipe_server(pipe_name.value()); }); launch_process(pipe_name.value()); create_pipe_thread.join(); } @@ -730,12 +816,19 @@ public: m_preview_custom_format_output = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_SHOW_CUSTOM_PREVIEW).GetNamedBoolean(JSON_KEY_VALUE); } + std::unordered_map additionalActionMap; + for (const auto& action : m_additional_actions) + { + additionalActionMap[kebab_to_pascal_case(action.id)] = action.hotkey; + } + // order of args matter Trace::AdvancedPaste_SettingsTelemetry(m_paste_as_plain_hotkey, m_advanced_paste_ui_hotkey, m_paste_as_markdown_hotkey, m_paste_as_json_hotkey, - m_preview_custom_format_output); + m_preview_custom_format_output, + additionalActionMap); // If you don't need to do any custom processing of the settings, proceed // to persists the values calling: @@ -825,11 +918,24 @@ public: return true; } - const auto custom_action_index = hotkeyId - NUM_DEFAULT_HOTKEYS; - if (custom_action_index < m_custom_action_ids.size()) + const auto additional_action_index = hotkeyId - NUM_DEFAULT_HOTKEYS; + if (additional_action_index < m_additional_actions.size()) { - const auto id = m_custom_action_ids.at(custom_action_index); + const auto& id = m_additional_actions.at(additional_action_index).id; + + Logger::trace(L"Starting additional action id={}", id); + + Trace::AdvancedPaste_Invoked(std::format(L"{}Direct", kebab_to_pascal_case(id))); + + send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_ADDITIONAL_ACTION_MESSAGE, id); + return true; + } + + const auto custom_action_index = additional_action_index - m_additional_actions.size(); + if (custom_action_index < m_custom_actions.size()) + { + const auto id = m_custom_actions.at(custom_action_index).id; Logger::trace(L"Starting custom action id={}", id); @@ -844,7 +950,7 @@ public: virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override { - const size_t num_hotkeys = NUM_DEFAULT_HOTKEYS + m_custom_action_hotkeys.size(); + const size_t num_hotkeys = NUM_DEFAULT_HOTKEYS + m_additional_actions.size() + m_custom_actions.size(); if (hotkeys && buffer_size >= num_hotkeys) { @@ -852,9 +958,11 @@ public: m_advanced_paste_ui_hotkey, m_paste_as_markdown_hotkey, m_paste_as_json_hotkey }; - std::copy(default_hotkeys.begin(), default_hotkeys.end(), hotkeys); - std::copy(m_custom_action_hotkeys.begin(), m_custom_action_hotkeys.end(), hotkeys + NUM_DEFAULT_HOTKEYS); + + const auto get_action_hotkey = [](const auto& action) { return action.hotkey; }; + std::transform(m_additional_actions.begin(), m_additional_actions.end(), hotkeys + NUM_DEFAULT_HOTKEYS, get_action_hotkey); + std::transform(m_custom_actions.begin(), m_custom_actions.end(), hotkeys + NUM_DEFAULT_HOTKEYS + m_additional_actions.size(), get_action_hotkey); } return num_hotkeys; diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp index 87d610682f..0ae92a7187 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp @@ -58,45 +58,44 @@ void Trace::AdvancedPaste_SettingsTelemetry(const PowertoyModuleIface::Hotkey& p const PowertoyModuleIface::Hotkey& advancedPasteUIHotkey, const PowertoyModuleIface::Hotkey& pasteMarkdownHotkey, const PowertoyModuleIface::Hotkey& pasteJsonHotkey, - const bool preview_custom_format_output) noexcept + const bool preview_custom_format_output, + const std::unordered_map& additionalActionsHotkeys) noexcept { - std::wstring pastePlainHotkeyStr = - std::wstring(pastePlainHotkey.win ? L"Win + " : L"") + - std::wstring(pastePlainHotkey.ctrl ? L"Ctrl + " : L"") + - std::wstring(pastePlainHotkey.shift ? L"Shift + " : L"") + - std::wstring(pastePlainHotkey.alt ? L"Alt + " : L"") + - std::wstring(L"VK ") + std::to_wstring(pastePlainHotkey.key); + const auto getHotKeyStr = [](const PowertoyModuleIface::Hotkey& hotKey) + { + return std::wstring(hotKey.win ? L"Win + " : L"") + + std::wstring(hotKey.ctrl ? L"Ctrl + " : L"") + + std::wstring(hotKey.shift ? L"Shift + " : L"") + + std::wstring(hotKey.alt ? L"Alt + " : L"") + + std::wstring(L"VK ") + std::to_wstring(hotKey.key); + }; - std::wstring advancedPasteUIHotkeyStr = - std::wstring(advancedPasteUIHotkey.win ? L"Win + " : L"") + - std::wstring(advancedPasteUIHotkey.ctrl ? L"Ctrl + " : L"") + - std::wstring(advancedPasteUIHotkey.shift ? L"Shift + " : L"") + - std::wstring(advancedPasteUIHotkey.alt ? L"Alt + " : L"") + - std::wstring(L"VK ") + std::to_wstring(advancedPasteUIHotkey.key); + std::vector hotkeyStrs; + const auto getHotkeyCStr = [&](const PowertoyModuleIface::Hotkey& hotkey) + { + hotkeyStrs.push_back(getHotKeyStr(hotkey)); // Probably unnecessary, but offers protection against the macro TraceLoggingWideString expanding to something that would invalidate the pointer + return hotkeyStrs.back().c_str(); + }; - std::wstring pasteMarkdownHotkeyStr = - std::wstring(pasteMarkdownHotkey.win ? L"Win + " : L"") + - std::wstring(pasteMarkdownHotkey.ctrl ? L"Ctrl + " : L"") + - std::wstring(pasteMarkdownHotkey.shift ? L"Shift + " : L"") + - std::wstring(pasteMarkdownHotkey.alt ? L"Alt + " : L"") + - std::wstring(L"VK ") + std::to_wstring(pasteMarkdownHotkey.key); - - std::wstring pasteJsonHotkeyStr = - std::wstring(pasteJsonHotkey.win ? L"Win + " : L"") + - std::wstring(pasteJsonHotkey.ctrl ? L"Ctrl + " : L"") + - std::wstring(pasteJsonHotkey.shift ? L"Shift + " : L"") + - std::wstring(pasteJsonHotkey.alt ? L"Alt + " : L"") + - std::wstring(L"VK ") + std::to_wstring(pasteJsonHotkey.key); + const auto getAdditionalActionHotkeyCStr = [&](const std::wstring& name) + { + const auto it = additionalActionsHotkeys.find(name); + return it != additionalActionsHotkeys.end() ? getHotkeyCStr(it->second) : L""; + }; TraceLoggingWrite( g_hProvider, "AdvancedPaste_Settings", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE), - TraceLoggingWideString(pastePlainHotkeyStr.c_str(), "PastePlainHotkey"), - TraceLoggingWideString(advancedPasteUIHotkeyStr.c_str(), "AdvancedPasteUIHotkey"), - TraceLoggingWideString(pasteMarkdownHotkeyStr.c_str(), "PasteMarkdownHotkey"), - TraceLoggingWideString(pasteJsonHotkeyStr.c_str(), "PasteJsonHotkey"), - TraceLoggingBoolean(preview_custom_format_output, "ShowCustomPreview") + TraceLoggingWideString(getHotkeyCStr(pastePlainHotkey), "PastePlainHotkey"), + TraceLoggingWideString(getHotkeyCStr(advancedPasteUIHotkey), "AdvancedPasteUIHotkey"), + TraceLoggingWideString(getHotkeyCStr(pasteMarkdownHotkey), "PasteMarkdownHotkey"), + TraceLoggingWideString(getHotkeyCStr(pasteJsonHotkey), "PasteJsonHotkey"), + TraceLoggingBoolean(preview_custom_format_output, "ShowCustomPreview"), + TraceLoggingWideString(getAdditionalActionHotkeyCStr(L"ImageToText"), "ImageToTextHotkey"), + TraceLoggingWideString(getAdditionalActionHotkeyCStr(L"PasteAsTxtFile"), "PasteAsTxtFileHotkey"), + TraceLoggingWideString(getAdditionalActionHotkeyCStr(L"PasteAsPngFile"), "PasteAsPngFileHotkey"), + TraceLoggingWideString(getAdditionalActionHotkeyCStr(L"PasteAsHtmlFile"), "PasteAsHtmlFileHotkey") ); } diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h index d64d1cd874..7c0504d58e 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h @@ -1,5 +1,6 @@ #pragma once #include +#include class Trace { @@ -21,5 +22,6 @@ public: const PowertoyModuleIface::Hotkey& advancedPasteUIHotkey, const PowertoyModuleIface::Hotkey& pasteMarkdownHotkey, const PowertoyModuleIface::Hotkey& pasteJsonHotkey, - const bool preview_custom_format_output) noexcept; + const bool preview_custom_format_output, + const std::unordered_map& additionalActionsHotkeys) noexcept; }; diff --git a/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalAction.cs b/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalAction.cs new file mode 100644 index 0000000000..7a6fd3081a --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalAction.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization; + +using Microsoft.PowerToys.Settings.UI.Library.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.Library; + +public sealed partial class AdvancedPasteAdditionalAction : Observable, IAdvancedPasteAction +{ + private HotkeySettings _shortcut = new(); + private bool _isShown = true; + + [JsonPropertyName("shortcut")] + public HotkeySettings Shortcut + { + get => _shortcut; + set + { + if (_shortcut != value) + { + // We null-coalesce here rather than outside this branch as we want to raise PropertyChanged when the setter is called + // with null; the ShortcutControl depends on this. + _shortcut = value ?? new(); + + OnPropertyChanged(); + } + } + } + + [JsonPropertyName("isShown")] + public bool IsShown + { + get => _isShown; + set => Set(ref _isShown, value); + } +} diff --git a/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalActions.cs b/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalActions.cs new file mode 100644 index 0000000000..ce26962b02 --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalActions.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using System.Text.Json.Serialization; + +namespace Microsoft.PowerToys.Settings.UI.Library; + +public sealed class AdvancedPasteAdditionalActions +{ + public static class PropertyNames + { + public const string ImageToText = "image-to-text"; + public const string PasteAsFile = "paste-as-file"; + } + + [JsonPropertyName(PropertyNames.ImageToText)] + public AdvancedPasteAdditionalAction ImageToText { get; init; } = new(); + + [JsonPropertyName(PropertyNames.PasteAsFile)] + public AdvancedPastePasteAsFileAction PasteAsFile { get; init; } = new(); + + [JsonIgnore] + public IEnumerable AllActions => new IAdvancedPasteAction[] { ImageToText, PasteAsFile }.Concat(PasteAsFile.SubActions); +} diff --git a/src/settings-ui/Settings.UI.Library/AdvancedPasteCustomAction.cs b/src/settings-ui/Settings.UI.Library/AdvancedPasteCustomAction.cs index 585663026b..f3bb4431ca 100644 --- a/src/settings-ui/Settings.UI.Library/AdvancedPasteCustomAction.cs +++ b/src/settings-ui/Settings.UI.Library/AdvancedPasteCustomAction.cs @@ -3,14 +3,13 @@ // See the LICENSE file in the project root for more information. using System; -using System.ComponentModel; -using System.Runtime.CompilerServices; -using System.Text.Json; using System.Text.Json.Serialization; +using Microsoft.PowerToys.Settings.UI.Library.Helpers; + namespace Microsoft.PowerToys.Settings.UI.Library; -public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneable +public sealed class AdvancedPasteCustomAction : Observable, IAdvancedPasteAction, ICloneable { private int _id; private string _name = string.Empty; @@ -25,14 +24,7 @@ public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneab public int Id { get => _id; - set - { - if (_id != value) - { - _id = value; - OnPropertyChanged(); - } - } + set => Set(ref _id, value); } [JsonPropertyName("name")] @@ -41,10 +33,8 @@ public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneab get => _name; set { - if (_name != value) + if (Set(ref _name, value)) { - _name = value; - OnPropertyChanged(); UpdateIsValid(); } } @@ -56,10 +46,8 @@ public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneab get => _prompt; set { - if (_prompt != value) + if (Set(ref _prompt, value)) { - _prompt = value; - OnPropertyChanged(); UpdateIsValid(); } } @@ -86,62 +74,30 @@ public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneab public bool IsShown { get => _isShown; - set - { - if (_isShown != value) - { - _isShown = value; - OnPropertyChanged(); - } - } + set => Set(ref _isShown, value); } [JsonIgnore] public bool CanMoveUp { get => _canMoveUp; - set - { - if (_canMoveUp != value) - { - _canMoveUp = value; - OnPropertyChanged(); - } - } + set => Set(ref _canMoveUp, value); } [JsonIgnore] public bool CanMoveDown { get => _canMoveDown; - set - { - if (_canMoveDown != value) - { - _canMoveDown = value; - OnPropertyChanged(); - } - } + set => Set(ref _canMoveDown, value); } [JsonIgnore] public bool IsValid { get => _isValid; - private set - { - if (_isValid != value) - { - _isValid = value; - OnPropertyChanged(); - } - } + private set => Set(ref _isValid, value); } - public event PropertyChangedEventHandler PropertyChanged; - - public string ToJsonString() => JsonSerializer.Serialize(this); - public object Clone() { AdvancedPasteCustomAction clone = new(); @@ -160,11 +116,6 @@ public sealed class AdvancedPasteCustomAction : INotifyPropertyChanged, ICloneab CanMoveDown = other.CanMoveDown; } - private void OnPropertyChanged([CallerMemberName] string propertyName = null) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - private HotkeySettings GetShortcutClone() { object shortcut = null; diff --git a/src/settings-ui/Settings.UI.Library/AdvancedPastePasteAsFileAction.cs b/src/settings-ui/Settings.UI.Library/AdvancedPastePasteAsFileAction.cs new file mode 100644 index 0000000000..979e967d4a --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/AdvancedPastePasteAsFileAction.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Text.Json.Serialization; + +using Microsoft.PowerToys.Settings.UI.Library.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.Library; + +public sealed class AdvancedPastePasteAsFileAction : Observable, IAdvancedPasteAction +{ + public static class PropertyNames + { + public const string PasteAsTxtFile = "paste-as-txt-file"; + public const string PasteAsPngFile = "paste-as-png-file"; + public const string PasteAsHtmlFile = "paste-as-html-file"; + } + + private AdvancedPasteAdditionalAction _pasteAsTxtFile = new(); + private AdvancedPasteAdditionalAction _pasteAsPngFile = new(); + private AdvancedPasteAdditionalAction _pasteAsHtmlFile = new(); + private bool _isShown = true; + + [JsonPropertyName("isShown")] + public bool IsShown + { + get => _isShown; + set => Set(ref _isShown, value); + } + + [JsonPropertyName(PropertyNames.PasteAsTxtFile)] + public AdvancedPasteAdditionalAction PasteAsTxtFile + { + get => _pasteAsTxtFile; + init => Set(ref _pasteAsTxtFile, value); + } + + [JsonPropertyName(PropertyNames.PasteAsPngFile)] + public AdvancedPasteAdditionalAction PasteAsPngFile + { + get => _pasteAsPngFile; + init => Set(ref _pasteAsPngFile, value); + } + + [JsonPropertyName(PropertyNames.PasteAsHtmlFile)] + public AdvancedPasteAdditionalAction PasteAsHtmlFile + { + get => _pasteAsHtmlFile; + init => Set(ref _pasteAsHtmlFile, value); + } + + [JsonIgnore] + public IEnumerable SubActions => [PasteAsTxtFile, PasteAsPngFile, PasteAsHtmlFile]; +} diff --git a/src/settings-ui/Settings.UI.Library/AdvancedPasteProperties.cs b/src/settings-ui/Settings.UI.Library/AdvancedPasteProperties.cs index 8e6ebb8238..8322302ddf 100644 --- a/src/settings-ui/Settings.UI.Library/AdvancedPasteProperties.cs +++ b/src/settings-ui/Settings.UI.Library/AdvancedPasteProperties.cs @@ -22,6 +22,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library PasteAsMarkdownShortcut = new(); PasteAsJsonShortcut = new(); CustomActions = new(); + AdditionalActions = new(); ShowCustomPreview = true; SendPasteKeyCombination = true; CloseAfterLosingFocus = false; @@ -51,7 +52,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library [JsonPropertyName("custom-actions")] [CmdConfigureIgnoreAttribute] - public AdvancedPasteCustomActions CustomActions { get; set; } + public AdvancedPasteCustomActions CustomActions { get; init; } + + [JsonPropertyName("additional-actions")] + [CmdConfigureIgnoreAttribute] + public AdvancedPasteAdditionalActions AdditionalActions { get; init; } public override string ToString() => JsonSerializer.Serialize(this); diff --git a/src/settings-ui/Settings.UI.Library/Helpers/Observable.cs b/src/settings-ui/Settings.UI.Library/Helpers/Observable.cs index a77099b4b8..79b4e9d2ee 100644 --- a/src/settings-ui/Settings.UI.Library/Helpers/Observable.cs +++ b/src/settings-ui/Settings.UI.Library/Helpers/Observable.cs @@ -11,17 +11,19 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Helpers { public event PropertyChangedEventHandler PropertyChanged; - protected void Set(ref T storage, T value, [CallerMemberName] string propertyName = null) + protected bool Set(ref T storage, T value, [CallerMemberName] string propertyName = null) { if (Equals(storage, value)) { - return; + return false; } storage = value; OnPropertyChanged(propertyName); + + return true; } - protected void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + protected void OnPropertyChanged([CallerMemberName] string propertyName = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } diff --git a/src/settings-ui/Settings.UI.Library/IAdvancedPasteAction.cs b/src/settings-ui/Settings.UI.Library/IAdvancedPasteAction.cs new file mode 100644 index 0000000000..4c31557010 --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/IAdvancedPasteAction.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; + +namespace Microsoft.PowerToys.Settings.UI.Library; + +public interface IAdvancedPasteAction : INotifyPropertyChanged +{ + public bool IsShown { get; } +} diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml index 1598beecc8..1d7205de96 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml @@ -24,6 +24,18 @@ ms-appx:///Assets/Settings/Modules/APDialog.light.png + + + + + + @@ -129,6 +141,7 @@ AllowDisable="True" HotkeySettings="{x:Bind Path=ViewModel.PasteAsJsonShortcut, Mode=TwoWay}" /> + @@ -202,6 +215,56 @@ IsTabStop="{x:Bind ViewModel.IsConflictingCopyShortcut, Mode=OneWay}" Severity="Warning" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index afd694d95f..ed662f87d0 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -725,6 +725,9 @@ Actions + + Additional actions + Current Key Remappings @@ -2046,6 +2049,21 @@ Made with 💗 by Microsoft and the PowerToys community. Paste as Custom with AI directly + + Image to text + + + Paste as file + + + Paste as .txt file + + + Paste as .png file + + + Paste as .html file + OpenAI API key: diff --git a/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs index 94787ae513..a0533d8d63 100644 --- a/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs @@ -38,6 +38,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private readonly object _delayedActionLock = new object(); private readonly AdvancedPasteSettings _advancedPasteSettings; + private readonly AdvancedPasteAdditionalActions _additionalActions; private readonly ObservableCollection _customActions; private Timer _delayedTimer; @@ -69,6 +70,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels _advancedPasteSettings = advancedPasteSettingsRepository.SettingsConfig; + _additionalActions = _advancedPasteSettings.Properties.AdditionalActions; _customActions = _advancedPasteSettings.Properties.CustomActions.Value; InitializeEnabledValue(); @@ -81,6 +83,11 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels _delayedTimer.Elapsed += DelayedTimer_Tick; _delayedTimer.AutoReset = false; + foreach (var action in _additionalActions.AllActions) + { + action.PropertyChanged += OnAdditionalActionPropertyChanged; + } + foreach (var customAction in _customActions) { customAction.PropertyChanged += OnCustomActionPropertyChanged; @@ -143,6 +150,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels public ObservableCollection CustomActions => _customActions; + public AdvancedPasteAdditionalActions AdditionalActions => _additionalActions; + private bool OpenAIKeyExists() { PasswordVault vault = new PasswordVault(); @@ -336,12 +345,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsConflictingCopyShortcut - { - get => _customActions.Select(customAction => customAction.Shortcut) - .Concat([PasteAsPlainTextShortcut, AdvancedPasteUIShortcut, PasteAsMarkdownShortcut, PasteAsJsonShortcut]) - .Any(hotkey => WarnHotkeys.Contains(hotkey.ToString())); - } + public bool IsConflictingCopyShortcut => + _customActions.Select(customAction => customAction.Shortcut) + .Concat([PasteAsPlainTextShortcut, AdvancedPasteUIShortcut, PasteAsMarkdownShortcut, PasteAsJsonShortcut]) + .Any(hotkey => WarnHotkeys.Contains(hotkey.ToString())); + + public bool IsAdditionalActionConflictingCopyShortcut => + _additionalActions.AllActions + .OfType() + .Select(additionalAction => additionalAction.Shortcut) + .Any(hotkey => WarnHotkeys.Contains(hotkey.ToString())); private void DelayedTimer_Tick(object sender, EventArgs e) { @@ -461,6 +474,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels NotifySettingsChanged(); } + private void OnAdditionalActionPropertyChanged(object sender, PropertyChangedEventArgs e) + { + SaveAndNotifySettings(); + + if (e.PropertyName == nameof(AdvancedPasteAdditionalAction.Shortcut)) + { + OnPropertyChanged(nameof(IsAdditionalActionConflictingCopyShortcut)); + } + } + private void OnCustomActionPropertyChanged(object sender, PropertyChangedEventArgs e) { if (typeof(AdvancedPasteCustomAction).GetProperty(e.PropertyName).GetCustomAttribute() == null) From e99b52fb35275d3259b41fb0c775cc081856c8f8 Mon Sep 17 00:00:00 2001 From: PesBandi <127593627+PesBandi@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:51:57 +0200 Subject: [PATCH 36/54] [PTRun][UnitConverter]Preserve more significant digits (#35073) * [PTRun][UnitConverter]Preserve more significant digits * Use StringComparison.OrdinalIgnoreCase --- .../UnitHandlerTests.cs | 49 +++---------------- .../Main.cs | 4 +- .../UnitConversionResult.cs | 20 ++++++-- .../UnitHandler.cs | 21 +------- 4 files changed, 28 insertions(+), 66 deletions(-) diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter.UnitTest/UnitHandlerTests.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter.UnitTest/UnitHandlerTests.cs index 0789d29a3c..bab0199b27 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter.UnitTest/UnitHandlerTests.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter.UnitTest/UnitHandlerTests.cs @@ -57,8 +57,8 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter.UnitTest var convertModel = new ConvertModel(1, "parsec", "nanometer"); var result = UnitHandler.Convert(convertModel).Single(); var str = result.ToString(System.Globalization.CultureInfo.InvariantCulture); - Assert.AreEqual(3.0857000000000004E+25, result.ConvertedValue); - Assert.AreEqual("3.0857e+25 nanometer", str); + Assert.AreEqual(3.08567758128E+25, result.ConvertedValue); + Assert.AreEqual("3.08567758128E+25 nanometer", str); } [TestMethod] @@ -67,8 +67,8 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter.UnitTest var convertModel = new ConvertModel(1, "nanometer", "parsec"); var result = UnitHandler.Convert(convertModel).Single(); var str = result.ToString(System.Globalization.CultureInfo.InvariantCulture); - Assert.AreEqual(3.2408000000000005E-26, result.ConvertedValue); - Assert.AreEqual("3.2408e-26 parsec", str); + Assert.AreEqual(3.240779289666357E-26, result.ConvertedValue); + Assert.AreEqual("3.2407792896664E-26 parsec", str); } [TestMethod] @@ -79,46 +79,13 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter.UnitTest Assert.AreEqual(0, results.Count()); } - [TestMethod] - public void RoundZero() - { - double result = UnitHandler.Round(0.0); - Assert.AreEqual(0, result); - } - [TestMethod] public void RoundNormalValue() { - double result = UnitHandler.Round(3.141592653589793); - Assert.AreEqual(3.1416, result); - } - - [TestMethod] - public void RoundSmallValue() - { - double result = UnitHandler.Round(1.23456789012345E-16); - Assert.AreEqual(1.2346E-16, result); - } - - [TestMethod] - public void RoundBigValue() - { - double result = UnitHandler.Round(1234567890123456.0); - Assert.AreEqual(1234600000000000.0, result); - } - - [TestMethod] - public void RoundNegativeValue() - { - double result = UnitHandler.Round(-3.141592653589793); - Assert.AreEqual(-3.1416, result); - } - - [TestMethod] - public void RoundNinesValue() - { - double result = UnitHandler.Round(999999999999.9998); - Assert.AreEqual(1000000000000.0, result); + var convertModel = new ConvertModel(3.14159265358979323, "stone", "kg"); + var result = UnitHandler.Convert(convertModel).Single(); + var str = result.ToString(System.Globalization.CultureInfo.InvariantCulture); + Assert.AreEqual("19.950018128979… kg", str); } } } diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs index 1d471420b4..bc4c00d7a7 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs @@ -72,7 +72,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter { try { - Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.Format, CultureInfo.CurrentCulture)); + Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.CopyFormat, CultureInfo.CurrentCulture)); ret = true; } catch (ExternalException) @@ -104,7 +104,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter { try { - Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.Format, CultureInfo.CurrentCulture)); + Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.CopyFormat, CultureInfo.CurrentCulture)); ret = true; } catch (ExternalException) diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitConversionResult.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitConversionResult.cs index 9c5c94c69e..576d677387 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitConversionResult.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitConversionResult.cs @@ -2,13 +2,16 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using UnitsNet; namespace Community.PowerToys.Run.Plugin.UnitConverter { public class UnitConversionResult { - public static string Format { get; set; } = "g14"; + public static string TitleFormat { get; set; } = "G14"; + + public static string CopyFormat { get; set; } = "R"; public double ConvertedValue { get; } @@ -23,14 +26,25 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter QuantityInfo = quantityInfo; } - public string ToString(System.IFormatProvider provider = null) + public string ToString(IFormatProvider provider = null) { if (provider == null) { provider = System.Globalization.CultureInfo.CurrentCulture; } - return ConvertedValue.ToString(Format, provider) + " " + UnitName; + // Check if the formatted number matches the original value. If they differ, some + // decimal places where cut off, and therefore we add an ellipsis. + string formatted = ConvertedValue.ToString(TitleFormat, provider); + + if (double.TryParse(formatted, provider, out double parsedNumber) && + Math.Abs(ConvertedValue - parsedNumber) > double.Epsilon && + !formatted.Contains('E', StringComparison.OrdinalIgnoreCase)) + { + return formatted + "… " + UnitName; + } + + return formatted + " " + UnitName; } } } diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs index d8c0dce3c6..fe6b4634dd 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs @@ -11,8 +11,6 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter { public static class UnitHandler { - private static readonly int _roundingSignificantDigits = 4; - private static readonly QuantityInfo[] _included = new QuantityInfo[] { Acceleration.Info, @@ -59,23 +57,6 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter return null; } - /// - /// Rounds the value to the predefined number of significant digits. - /// - /// Value to be rounded - public static double Round(double value) - { - if (value == 0.0D) - { - return 0; - } - - var power = Math.Floor(Math.Log10(Math.Abs(value))); - var exponent = Math.Pow(10, power); - var rounded = Math.Round(value / exponent, _roundingSignificantDigits) * exponent; - return rounded; - } - /// /// Given parsed ConvertModel, computes result. (E.g "1 foot in cm"). /// @@ -106,7 +87,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter if (!double.IsNaN(convertedValue)) { - UnitConversionResult result = new UnitConversionResult(Round(convertedValue), convertModel.ToUnit, quantityInfo); + UnitConversionResult result = new UnitConversionResult(convertedValue, convertModel.ToUnit, quantityInfo); results.Add(result); } } From 8fb45b5a55331feb6aa7410d1fde8d5c333443be Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Fri, 18 Oct 2024 14:52:47 +0100 Subject: [PATCH 37/54] [Peek] Improve folder enumeration (#35076) * Improve folder enumeration. Fix initial display of folder details. Simplify UnsupportedFilePreviewer. Use Progress method for reporting progress. #35008 * Remove unused using. * Apply suggestions from code review Co-authored-by: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> * Implement PR review suggestions, including fix for InaccessibleFiles not being skipped. * Folder enumeration avoids Reparse Points. Moved enumeration options to field. * Remove unused using. * Make folder enumeration options static...again. --- .../UnsupportedFilePreviewer.cs | 252 +++++++----------- 1 file changed, 93 insertions(+), 159 deletions(-) diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/UnsupportedFilePreviewer/UnsupportedFilePreviewer.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/UnsupportedFilePreviewer/UnsupportedFilePreviewer.cs index 8644422f9f..d287eb41bf 100644 --- a/src/modules/peek/Peek.FilePreviewer/Previewers/UnsupportedFilePreviewer/UnsupportedFilePreviewer.cs +++ b/src/modules/peek/Peek.FilePreviewer/Previewers/UnsupportedFilePreviewer/UnsupportedFilePreviewer.cs @@ -5,13 +5,13 @@ using System; using System.Globalization; using System.IO; +using System.Linq; using System.Threading; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using ManagedCommon; using Microsoft.UI.Dispatching; -using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media.Imaging; using Peek.Common.Extensions; using Peek.Common.Helpers; @@ -22,27 +22,42 @@ using Windows.Foundation; namespace Peek.FilePreviewer.Previewers { - public partial class UnsupportedFilePreviewer : ObservableObject, IUnsupportedFilePreviewer, IDisposable + public partial class UnsupportedFilePreviewer : ObservableObject, IUnsupportedFilePreviewer { - private static readonly EnumerationOptions _fileEnumOptions = new() { MatchType = MatchType.Win32, AttributesToSkip = 0, IgnoreInaccessible = true }; - private static readonly EnumerationOptions _directoryEnumOptions = new() { MatchType = MatchType.Win32, AttributesToSkip = FileAttributes.ReparsePoint, IgnoreInaccessible = true }; - private readonly DispatcherTimer _folderSizeDispatcherTimer = new(); - private ulong _folderSize; + /// + /// The number of files to scan between updates when calculating folder size. + /// + private const int FolderEnumerationChunkSize = 100; + + /// + /// The maximum view updates per second when enumerating a folder's contents. + /// + private const int MaxUpdateFps = 15; + + /// + /// The icon to display when a file or folder's thumbnail or icon could not be retrieved. + /// + private static readonly SvgImageSource DefaultIcon = new(new Uri("ms-appx:///Assets/Peek/DefaultFileIcon.svg")); + + /// + /// The options to use for the folder size enumeration. We recurse through all files and all subfolders. + /// + private static readonly EnumerationOptions FolderEnumerationOptions; [ObservableProperty] - private UnsupportedFilePreviewData preview = new UnsupportedFilePreviewData(); + private UnsupportedFilePreviewData preview = new(); [ObservableProperty] private PreviewState state; + static UnsupportedFilePreviewer() + { + FolderEnumerationOptions = new() { RecurseSubdirectories = true, AttributesToSkip = FileAttributes.ReparsePoint }; + } + public UnsupportedFilePreviewer(IFileSystemItem file) { - _folderSizeDispatcherTimer.Interval = TimeSpan.FromMilliseconds(500); - _folderSizeDispatcherTimer.Tick += FolderSizeDispatcherTimer_Tick; - Item = file; - Preview.FileName = file.Name; - Preview.DateModified = file.DateModified?.ToString(CultureInfo.CurrentCulture); Dispatcher = DispatcherQueue.GetForCurrentThread(); } @@ -50,41 +65,40 @@ namespace Peek.FilePreviewer.Previewers private DispatcherQueue Dispatcher { get; } - private Task? IconPreviewTask { get; set; } - - private Task? DisplayInfoTask { get; set; } - - public void Dispose() - { - _folderSizeDispatcherTimer.Tick -= FolderSizeDispatcherTimer_Tick; - GC.SuppressFinalize(this); - } - - public Task GetPreviewSizeAsync(CancellationToken cancellationToken) - { - Size? size = new Size(680, 500); - var previewSize = new PreviewSize { MonitorSize = size, UseEffectivePixels = true }; - return Task.FromResult(previewSize); - } + public Task GetPreviewSizeAsync(CancellationToken cancellationToken) => + Task.FromResult(new PreviewSize { MonitorSize = new Size(680, 500), UseEffectivePixels = true }); public async Task LoadPreviewAsync(CancellationToken cancellationToken) { - cancellationToken.ThrowIfCancellationRequested(); - - State = PreviewState.Loading; - - IconPreviewTask = LoadIconPreviewAsync(cancellationToken); - DisplayInfoTask = LoadDisplayInfoAsync(cancellationToken); - - await Task.WhenAll(IconPreviewTask, DisplayInfoTask); - - if (HasFailedLoadingPreview()) + try { - State = PreviewState.Error; + await Dispatcher.RunOnUiThread(async () => + { + Preview.FileName = Item.Name; + Preview.DateModified = Item.DateModified?.ToString(CultureInfo.CurrentCulture); + + State = PreviewState.Loaded; + + await LoadIconPreviewAsync(cancellationToken); + }); + + var progress = new Progress(update => + { + Dispatcher.TryEnqueue(() => + { + Preview.FileSize = update; + }); + }); + + await LoadDisplayInfoAsync(progress, cancellationToken); } - else + catch (OperationCanceledException) { - State = PreviewState.Loaded; + } + catch (Exception ex) + { + Logger.LogError("UnsupportedFilePreviewer error.", ex); + State = PreviewState.Error; } } @@ -97,139 +111,59 @@ namespace Peek.FilePreviewer.Previewers }); } - public async Task LoadIconPreviewAsync(CancellationToken cancellationToken) + private async Task LoadIconPreviewAsync(CancellationToken cancellationToken) { - bool isIconValid = false; - - var isTaskSuccessful = await TaskExtension.RunSafe(async () => - { - cancellationToken.ThrowIfCancellationRequested(); - await Dispatcher.RunOnUiThread(async () => - { - cancellationToken.ThrowIfCancellationRequested(); - - var iconBitmap = await ThumbnailHelper.GetThumbnailAsync(Item.Path, cancellationToken) - ?? await ThumbnailHelper.GetIconAsync(Item.Path, cancellationToken); - - cancellationToken.ThrowIfCancellationRequested(); - - isIconValid = iconBitmap != null; - - Preview.IconPreview = iconBitmap ?? new SvgImageSource(new Uri("ms-appx:///Assets/Peek/DefaultFileIcon.svg")); - }); - }); - - return isIconValid && isTaskSuccessful; + Preview.IconPreview = await ThumbnailHelper.GetThumbnailAsync(Item.Path, cancellationToken) ?? + await ThumbnailHelper.GetIconAsync(Item.Path, cancellationToken) ?? + DefaultIcon; } - public async Task LoadDisplayInfoAsync(CancellationToken cancellationToken) + private async Task LoadDisplayInfoAsync(IProgress sizeProgress, CancellationToken cancellationToken) { - bool isDisplayValid = false; + string type = await Item.GetContentTypeAsync(); - var isTaskSuccessful = await TaskExtension.RunSafe(async () => + Dispatcher.TryEnqueue(() => Preview.FileType = type); + + if (Item is FolderItem folderItem) { - cancellationToken.ThrowIfCancellationRequested(); - - var type = await Task.Run(Item.GetContentTypeAsync); - - cancellationToken.ThrowIfCancellationRequested(); - - isDisplayValid = type != null; - - var readableFileSize = string.Empty; - - if (Item is FileItem) - { - readableFileSize = ReadableStringHelper.BytesToReadableString(Item.FileSizeBytes); - } - else if (Item is FolderItem) - { - ComputeFolderSize(cancellationToken); - } - - await Dispatcher.RunOnUiThread(() => - { - Preview.FileSize = readableFileSize; - Preview.FileType = type; - return Task.CompletedTask; - }); - }); - - return isDisplayValid && isTaskSuccessful; - } - - private bool HasFailedLoadingPreview() - { - var isLoadingIconPreviewSuccessful = IconPreviewTask?.Result ?? false; - var isLoadingDisplayInfoSuccessful = DisplayInfoTask?.Result ?? false; - - return !isLoadingIconPreviewSuccessful || !isLoadingDisplayInfoSuccessful; - } - - private void ComputeFolderSize(CancellationToken cancellationToken) - { - Task.Run( - async () => - { - try - { - // Special folders like recycle bin don't have a path - if (string.IsNullOrWhiteSpace(Item.Path)) - { - return; - } - - await Dispatcher.RunOnUiThread(_folderSizeDispatcherTimer.Start); - GetDirectorySize(new DirectoryInfo(Item.Path), cancellationToken); - } - catch (OperationCanceledException) - { - } - catch (Exception ex) - { - Logger.LogError("Failed to calculate folder size", ex); - } - finally - { - await Dispatcher.RunOnUiThread(_folderSizeDispatcherTimer.Stop); - } - - // If everything went well, ensure the UI is updated - await Dispatcher.RunOnUiThread(UpdateFolderSize); - }, - cancellationToken); - } - - private void GetDirectorySize(DirectoryInfo directory, CancellationToken cancellationToken) - { - var files = directory.GetFiles("*", _fileEnumOptions); - for (var i = 0; i < files.Length; i++) - { - cancellationToken.ThrowIfCancellationRequested(); - - var f = files[i]; - if (f.Length > 0) - { - _folderSize += Convert.ToUInt64(f.Length); - } + await Task.Run(() => CalculateFolderSizeWithProgress(Item.Path, sizeProgress, cancellationToken), cancellationToken); } - - var directories = directory.GetDirectories("*", _directoryEnumOptions); - for (var i = 0; i < directories.Length; i++) + else { - cancellationToken.ThrowIfCancellationRequested(); - GetDirectorySize(directories[i], cancellationToken); + ReportProgress(sizeProgress, Item.FileSizeBytes); } } - private void UpdateFolderSize() + private void CalculateFolderSizeWithProgress(string path, IProgress progress, CancellationToken cancellationToken) { - Preview.FileSize = ReadableStringHelper.BytesToReadableString(_folderSize); + ulong folderSize = 0; + TimeSpan updateInterval = TimeSpan.FromMilliseconds(1000 / MaxUpdateFps); + DateTime nextUpdate = DateTime.UtcNow + updateInterval; + + var files = new DirectoryInfo(path).EnumerateFiles("*", FolderEnumerationOptions); + + foreach (var chunk in files.Chunk(FolderEnumerationChunkSize)) + { + cancellationToken.ThrowIfCancellationRequested(); + + if (DateTime.Now >= nextUpdate) + { + ReportProgress(progress, folderSize); + nextUpdate = DateTime.UtcNow + updateInterval; + } + + foreach (var file in chunk) + { + folderSize += (ulong)file.Length; + } + } + + ReportProgress(progress, folderSize); } - private void FolderSizeDispatcherTimer_Tick(object? sender, object e) + private void ReportProgress(IProgress progress, ulong size) { - UpdateFolderSize(); + progress.Report(ReadableStringHelper.BytesToReadableString(size)); } } } From 37eaf10bf090873e565d754a7fad38c55147d987 Mon Sep 17 00:00:00 2001 From: Heiko <61519853+htcfreek@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:02:25 +0200 Subject: [PATCH 38/54] [Settings > New+ page] Fix enabled state of template backup info bar (#35235) Update NewPlusPage.xaml --- .../Settings.UI/SettingsXAML/Views/NewPlusPage.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml index f232227b05..ef8b9c68e8 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml @@ -60,9 +60,9 @@ From 5cba82f9290af1f04c2679079a66adcda7be98a4 Mon Sep 17 00:00:00 2001 From: Michael Clayton Date: Fri, 18 Oct 2024 17:32:08 +0100 Subject: [PATCH 39/54] [MWB][CQ]Refactoring "Common" classes - Common.Log.cs (#35156) * [MouseWithoutBorders] - split "Common.Log.cs" into "Logger.cs" * [MouseWithoutBorders] - fix references to Logger * [MouseWithoutBorders] - add MouseWithoutBorders.UnitTests * [MouseWithoutBorders] - fixing broken tests * [MouseWithoutBorders] - fixing spelling * [MouseWithoutBorders] - fixing spelling * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixed compile error * [MouseWithoutBorders] - fixed failing test * [MouseWithoutBorders] - fixed failing build * [MouseWithoutBorders] - ignore flakey test --- .github/actions/spell-check/expect.txt | 1 + PowerToys.sln | 15 + .../App/Class/Common.Clipboard.cs | 137 +++--- .../App/Class/Common.DragDrop.cs | 47 +- .../App/Class/Common.Encryption.cs | 10 +- .../App/Class/Common.Event.cs | 25 +- .../App/Class/Common.Helper.cs | 38 +- .../App/Class/Common.InitAndCleanup.cs | 21 +- .../App/Class/Common.Launch.cs | 37 +- .../App/Class/Common.Log.cs | 384 +-------------- .../App/Class/Common.MachineStuff.cs | 33 +- .../App/Class/Common.Receiver.cs | 21 +- .../App/Class/Common.Service.cs | 13 +- .../App/Class/Common.ShutdownWithPowerToys.cs | 4 +- .../App/Class/Common.WinAPI.cs | 41 +- .../MouseWithoutBorders/App/Class/Common.cs | 99 ++-- .../App/Class/CustomCursor.cs | 10 +- .../App/Class/Extensions.cs | 4 +- .../App/Class/IClipboardHelper.cs | 15 +- .../App/Class/InputHook.cs | 15 +- .../App/Class/InputSimulation.cs | 17 +- .../MouseWithoutBorders/App/Class/Program.cs | 46 +- .../MouseWithoutBorders/App/Class/Setting.cs | 9 +- .../App/Class/SocketStuff.cs | 233 ++++----- .../App/Class/TcpServer.cs | 8 +- .../MouseWithoutBorders/App/Core/Logger.cs | 447 ++++++++++++++++++ .../App/Form/Settings/SettingsForm.cs | 10 +- .../App/Form/Settings/SetupPage3a.cs | 3 +- .../App/Form/frmInputCallback.cs | 3 +- .../MouseWithoutBorders/App/Form/frmMatrix.cs | 8 +- .../MouseWithoutBorders/App/Form/frmScreen.cs | 33 +- .../App/Helper/FormHelper.cs | 10 +- .../App/Properties/AssemblyInfo.cs | 7 + .../Core/Logger.PrivateDump.expected.txt | 404 ++++++++++++++++ .../Core/Logger.PrivateDump.original.txt | 405 ++++++++++++++++ .../Core/LoggerTests.cs | 161 +++++++ .../MouseWithoutBorders.UnitTests.csproj | 30 ++ 37 files changed, 1965 insertions(+), 839 deletions(-) create mode 100644 src/modules/MouseWithoutBorders/App/Core/Logger.cs create mode 100644 src/modules/MouseWithoutBorders/App/Properties/AssemblyInfo.cs create mode 100644 src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.expected.txt create mode 100644 src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.original.txt create mode 100644 src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/LoggerTests.cs create mode 100644 src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/MouseWithoutBorders.UnitTests.csproj diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 83689c8071..eeb735f825 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1911,6 +1911,7 @@ XFile XIncrement XLoc XNamespace +Xoshiro XPels XPixel xplorer diff --git a/PowerToys.sln b/PowerToys.sln index e91c2e3907..1113ab5530 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -622,6 +622,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesLauncher", "src\m EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesWindowArranger", "src\modules\Workspaces\WorkspacesWindowArranger\WorkspacesWindowArranger.vcxproj", "{37D07516-4185-43A4-924F-3C7A5D95ECF6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseWithoutBorders.UnitTests", "src\modules\MouseWithoutBorders\MouseWithoutBorders.UnitTests\MouseWithoutBorders.UnitTests.csproj", "{66614C26-314C-4B91-9071-76133422CFEF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM64 = Debug|ARM64 @@ -2734,6 +2736,18 @@ Global {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x64.Build.0 = Release|x64 {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x86.ActiveCfg = Release|x64 {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x86.Build.0 = Release|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|ARM64.Build.0 = Debug|ARM64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|x64.ActiveCfg = Debug|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|x64.Build.0 = Debug|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|x86.ActiveCfg = Debug|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Debug|x86.Build.0 = Debug|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|ARM64.ActiveCfg = Release|ARM64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|ARM64.Build.0 = Release|ARM64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.ActiveCfg = Release|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|x64.Build.0 = Release|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|x86.ActiveCfg = Release|x64 + {66614C26-314C-4B91-9071-76133422CFEF}.Release|x86.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2962,6 +2976,7 @@ Global {367D7543-7DBA-4381-99F1-BF6142A996C4} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} {2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} {37D07516-4185-43A4-924F-3C7A5D95ECF6} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} + {66614C26-314C-4B91-9071-76133422CFEF} = {B6C42F16-73EB-477E-8B0D-4E6CF6C20AAC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Clipboard.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Clipboard.cs index e476ec3554..68f700c3d4 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Clipboard.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Clipboard.cs @@ -28,6 +28,7 @@ using Microsoft.PowerToys.Telemetry; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Exceptions; using SystemClipboard = System.Windows.Forms.Clipboard; @@ -83,8 +84,8 @@ namespace MouseWithoutBorders internal static bool CheckClipboardEx(ByteArrayOrString data, bool isFilePath) { - LogDebug($"{nameof(CheckClipboardEx)}: ShareClipboard = {Setting.Values.ShareClipboard}, TransferFile = {Setting.Values.TransferFile}, data = {data}."); - LogDebug($"{nameof(CheckClipboardEx)}: {nameof(Setting.Values.OneWayClipboardMode)} = {Setting.Values.OneWayClipboardMode}."); + Logger.LogDebug($"{nameof(CheckClipboardEx)}: ShareClipboard = {Setting.Values.ShareClipboard}, TransferFile = {Setting.Values.TransferFile}, data = {data}."); + Logger.LogDebug($"{nameof(CheckClipboardEx)}: {nameof(Setting.Values.OneWayClipboardMode)} = {Setting.Values.OneWayClipboardMode}."); if (!Setting.Values.ShareClipboard) { @@ -98,7 +99,7 @@ namespace MouseWithoutBorders if (GetTick() - LastClipboardEventTime < 1000) { - LogDebug("GetTick() - lastClipboardEventTime < 1000"); + Logger.LogDebug("GetTick() - lastClipboardEventTime < 1000"); LastClipboardEventTime = GetTick(); return false; } @@ -130,7 +131,7 @@ namespace MouseWithoutBorders { if (lastClipboardObject is string lastStringData && lastStringData.Equals(stringData, StringComparison.OrdinalIgnoreCase)) { - LogDebug("CheckClipboardEx: Same string data."); + Logger.LogDebug("CheckClipboardEx: Same string data."); return false; } } @@ -139,11 +140,11 @@ namespace MouseWithoutBorders if (isFilePath) { - Common.LogDebug("Clipboard contains FileDropList"); + Logger.LogDebug("Clipboard contains FileDropList"); if (!Setting.Values.TransferFile) { - Common.LogDebug("TransferFile option is unchecked."); + Logger.LogDebug("TransferFile option is unchecked."); return false; } @@ -155,7 +156,7 @@ namespace MouseWithoutBorders { if (File.Exists(filePath) && new FileInfo(filePath).Length <= MAX_CLIPBOARD_FILE_SIZE_CAN_BE_SENT) { - LogDebug("Clipboard contains: " + filePath); + Logger.LogDebug("Clipboard contains: " + filePath); LastDragDropFile = filePath; SendClipboardBeat(); SetToggleIcon(new int[TOGGLE_ICONS_SIZE] { ICON_BIG_CLIPBOARD, -1, ICON_BIG_CLIPBOARD, -1 }); @@ -164,7 +165,7 @@ namespace MouseWithoutBorders { if (Directory.Exists(filePath)) { - LogDebug("Clipboard contains a directory: " + filePath); + Logger.LogDebug("Clipboard contains a directory: " + filePath); LastDragDropFile = filePath; SendClipboardBeat(); } @@ -172,7 +173,7 @@ namespace MouseWithoutBorders { LastDragDropFile = filePath + " - File too big (greater than 100MB), please drag and drop the file instead!"; SendClipboardBeat(); - Log("Clipboard: File too big: " + filePath); + Logger.Log("Clipboard: File too big: " + filePath); } SetToggleIcon(new int[TOGGLE_ICONS_SIZE] { ICON_ERROR, -1, ICON_ERROR, -1 }); @@ -180,7 +181,7 @@ namespace MouseWithoutBorders } else { - Log("CheckClipboardEx: File not found: " + filePath); + Logger.Log("CheckClipboardEx: File not found: " + filePath); } }); } @@ -194,7 +195,7 @@ namespace MouseWithoutBorders s.Write(texts, 0, texts.Length); } - Common.LogDebug("Plain/Zip = " + texts.Length.ToString(CultureInfo.CurrentCulture) + "/" + + Logger.LogDebug("Plain/Zip = " + texts.Length.ToString(CultureInfo.CurrentCulture) + "/" + ms.Length.ToString(CultureInfo.CurrentCulture)); LastClipboardData = ms.GetBuffer(); @@ -206,20 +207,20 @@ namespace MouseWithoutBorders { if (lastClipboardObject is byte[] lastByteData && Enumerable.SequenceEqual(lastByteData, byteData)) { - LogDebug("CheckClipboardEx: Same byte[] data."); + Logger.LogDebug("CheckClipboardEx: Same byte[] data."); return false; } } HasSwitchedMachineSinceLastCopy = false; - Common.LogDebug("Clipboard contains image"); + Logger.LogDebug("Clipboard contains image"); IsClipboardDataImage = true; LastClipboardData = byteData; } else { - LogDebug("*** Clipboard contains something else!"); + Logger.LogDebug("*** Clipboard contains something else!"); return false; } @@ -243,7 +244,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } return false; @@ -334,7 +335,7 @@ namespace MouseWithoutBorders ProcessPackage(data, tcp); if (++unexpectedCount > 100) { - Log("ReceiveClipboardDataUsingTCP: unexpectedCount > 100!"); + Logger.Log("ReceiveClipboardDataUsingTCP: unexpectedCount > 100!"); done = true; } @@ -363,7 +364,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log("ReceiveClipboardDataUsingTCP: " + e.Message); + Logger.Log("ReceiveClipboardDataUsingTCP: " + e.Message); } } @@ -396,7 +397,7 @@ namespace MouseWithoutBorders { if (Sk == null) { - Log("ConnectAndGetData: Sk == null!"); + Logger.Log("ConnectAndGetData: Sk == null!"); return; } @@ -404,7 +405,7 @@ namespace MouseWithoutBorders TcpClient clipboardTcpClient = null; string postAct = (string)postAction; - LogDebug("ConnectAndGetData.postAction: " + postAct); + Logger.LogDebug("ConnectAndGetData.postAction: " + postAct); ClipboardPostAction clipboardPostAct = postAct.Contains("mspaint,") ? ClipboardPostAction.Mspaint : postAct.Equals("desktop", StringComparison.OrdinalIgnoreCase) ? ClipboardPostAction.Desktop @@ -418,7 +419,7 @@ namespace MouseWithoutBorders if (!IsConnectedByAClientSocketTo(remoteMachine)) { - Log($"No potential inbound connection from {MachineName} to {remoteMachine}, ask for a push back instead."); + Logger.Log($"No potential inbound connection from {MachineName} to {remoteMachine}, ask for a push back instead."); ID machineId = MachinePool.ResolveID(remoteMachine); if (machineId != ID.NONE) @@ -436,7 +437,7 @@ namespace MouseWithoutBorders } else { - Log($"Unable to resolve {remoteMachine} to its long IP."); + Logger.Log($"Unable to resolve {remoteMachine} to its long IP."); } return; @@ -448,7 +449,7 @@ namespace MouseWithoutBorders } catch (ThreadAbortException) { - Common.Log("The current thread is being aborted (1)."); + Logger.Log("The current thread is being aborted (1)."); if (clipboardTcpClient != null && clipboardTcpClient.Connected) { clipboardTcpClient.Client.Close(); @@ -458,7 +459,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] { Common.ICON_BIG_CLIPBOARD, @@ -513,7 +514,7 @@ namespace MouseWithoutBorders if ((rv = deStream.ReadEx(header, 0, header.Length)) < header.Length) { - Common.Log("Reading header failed: " + rv.ToString(CultureInfo.CurrentCulture)); + Logger.Log("Reading header failed: " + rv.ToString(CultureInfo.CurrentCulture)); Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] { Common.ICON_BIG_CLIPBOARD, @@ -523,12 +524,12 @@ namespace MouseWithoutBorders } fileName = Common.GetStringU(header).Replace("\0", string.Empty); - Common.LogDebug("Header: " + fileName); + Logger.LogDebug("Header: " + fileName); string[] headers = fileName.Split(Star); if (headers.Length < 2 || !long.TryParse(headers[0], out long dataSize)) { - Common.Log(string.Format( + Logger.Log(string.Format( CultureInfo.CurrentCulture, "Reading header failed: {0}:{1}", headers.Length, @@ -543,7 +544,7 @@ namespace MouseWithoutBorders fileName = headers[1]; - Common.LogDebug(string.Format( + Logger.LogDebug(string.Format( CultureInfo.CurrentCulture, "Receiving {0}:{1} from {2}...", Path.GetFileName(fileName), @@ -593,7 +594,7 @@ namespace MouseWithoutBorders m = new FileStream(tempFile, FileMode.Create); } - Common.Log("==> " + tempFile); + Logger.Log("==> " + tempFile); } ShowToolTip( @@ -643,7 +644,7 @@ namespace MouseWithoutBorders if (m != null && fileName != null) { m.Flush(); - Common.LogDebug(m.Length.ToString(CultureInfo.CurrentCulture) + " bytes received."); + Logger.LogDebug(m.Length.ToString(CultureInfo.CurrentCulture) + " bytes received."); Common.LastClipboardEventTime = Common.GetTick(); string toolTipText = null; string sizeText = m.Length >= 1024 @@ -738,7 +739,7 @@ namespace MouseWithoutBorders } catch (ThreadAbortException) { - Common.Log("The current thread is being aborted (3)."); + Logger.Log("The current thread is being aborted (3)."); s.Close(); if (m != null) @@ -754,11 +755,11 @@ namespace MouseWithoutBorders if (e is IOException) { string log = $"{nameof(ReceiveAndProcessClipboardData)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } else { - Common.Log(e); + Logger.Log(e); } Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] @@ -805,15 +806,15 @@ namespace MouseWithoutBorders NetworkStream ns = new(s); enStream = Common.GetEncryptedStream(ns); Common.SendOrReceiveARandomDataBlockPerInitialIV(enStream); - LogDebug($"{nameof(ShakeHand)}: Writing header package."); + Logger.LogDebug($"{nameof(ShakeHand)}: Writing header package."); enStream.Write(package.Bytes, 0, PACKAGE_SIZE_EX); - LogDebug($"{nameof(ShakeHand)}: Sent: clientPush={clientPushData}, postAction={postAction}."); + Logger.LogDebug($"{nameof(ShakeHand)}: Sent: clientPush={clientPushData}, postAction={postAction}."); deStream = Common.GetDecryptedStream(ns); Common.SendOrReceiveARandomDataBlockPerInitialIV(deStream, false); - LogDebug($"{nameof(ShakeHand)}: Reading header package."); + Logger.LogDebug($"{nameof(ShakeHand)}: Reading header package."); int bytesReceived = deStream.ReadEx(buf, 0, Common.PACKAGE_SIZE_EX); package.Bytes = buf; @@ -826,41 +827,41 @@ namespace MouseWithoutBorders { name = remoteName = package.MachineName; - Common.LogDebug($"{nameof(ShakeHand)}: Connection from {name}:{package.Src}"); + Logger.LogDebug($"{nameof(ShakeHand)}: Connection from {name}:{package.Src}"); if (Common.MachinePool.ResolveID(name) == package.Src && Common.IsConnectedTo(package.Src)) { clientPushData = package.Type == PackageType.ClipboardPush; postAction = package.PostAction; handShaken = true; - LogDebug($"{nameof(ShakeHand)}: Received: clientPush={clientPushData}, postAction={postAction}."); + Logger.LogDebug($"{nameof(ShakeHand)}: Received: clientPush={clientPushData}, postAction={postAction}."); } else { - Common.LogDebug($"{nameof(ShakeHand)}: No active connection to the machine: {name}."); + Logger.LogDebug($"{nameof(ShakeHand)}: No active connection to the machine: {name}."); } } else { - Common.LogDebug($"{nameof(ShakeHand)}: Unexpected package type: {package.Type}."); + Logger.LogDebug($"{nameof(ShakeHand)}: Unexpected package type: {package.Type}."); } } else { - Common.LogDebug($"{nameof(ShakeHand)}: BytesTransferred != PACKAGE_SIZE_EX: {bytesReceived}"); + Logger.LogDebug($"{nameof(ShakeHand)}: BytesTransferred != PACKAGE_SIZE_EX: {bytesReceived}"); } if (!handShaken) { string msg = $"Clipboard connection rejected: {name}:{remoteName}/{package.Src}\r\n\r\nMake sure you run the same version in all machines."; - Common.Log(msg); + Logger.Log(msg); Common.ShowToolTip(msg, 3000, ToolTipIcon.Warning); Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] { Common.ICON_BIG_CLIPBOARD, -1, -1, -1 }); } } catch (ThreadAbortException) { - Common.Log($"{nameof(ShakeHand)}: The current thread is being aborted."); + Logger.Log($"{nameof(ShakeHand)}: The current thread is being aborted."); s.Close(); } catch (Exception e) @@ -868,11 +869,11 @@ namespace MouseWithoutBorders if (e is IOException) { string log = $"{nameof(ShakeHand)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } else { - Common.Log(e); + Logger.Log(e); } Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] @@ -906,7 +907,7 @@ namespace MouseWithoutBorders Common.DoSomethingInUIThread(() => Common.MainForm.ChangeIcon(Common.ICON_SMALL_CLIPBOARD)); System.Net.IPAddress ip = GetConnectedClientSocketIPAddressFor(remoteMachine); - Common.LogDebug($"{nameof(ConnectToRemoteClipboardSocket)}Connecting to {remoteMachine}:{ip}:{sk.TcpPort}..."); + Logger.LogDebug($"{nameof(ConnectToRemoteClipboardSocket)}Connecting to {remoteMachine}:{ip}:{sk.TcpPort}..."); if (ip != null) { @@ -917,7 +918,7 @@ namespace MouseWithoutBorders clipboardTcpClient.Connect(remoteMachine, sk.TcpPort); } - Common.LogDebug($"Connected from {clipboardTcpClient.Client.LocalEndPoint}. Getting data..."); + Logger.LogDebug($"Connected from {clipboardTcpClient.Client.LocalEndPoint}. Getting data..."); return clipboardTcpClient; } else @@ -930,7 +931,7 @@ namespace MouseWithoutBorders { if (data == null || data.Length <= 0) { - Common.Log("data is null or empty!"); + Logger.Log("data is null or empty!"); return; } @@ -988,28 +989,28 @@ namespace MouseWithoutBorders if (txt.StartsWith("RTF", StringComparison.CurrentCultureIgnoreCase)) { - Common.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of RTF <-"); + Logger.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of RTF <-"); data1.SetData(DataFormats.Rtf, tmp); } else if (txt.StartsWith("HTM", StringComparison.CurrentCultureIgnoreCase)) { - Common.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of HTM <-"); + Logger.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of HTM <-"); data1.SetData(DataFormats.Html, tmp); } else if (txt.StartsWith("TXT", StringComparison.CurrentCultureIgnoreCase)) { - Common.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of TXT <-"); + Logger.LogDebug(((double)tmp.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of TXT <-"); data1.SetData(DataFormats.UnicodeText, tmp); } else { if (textTypeCount == 0) { - Common.LogDebug(((double)txt.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of UNI <-"); + Logger.LogDebug(((double)txt.Length / 1024).ToString("0.00", CultureInfo.InvariantCulture) + "KB of UNI <-"); data1.SetData(DataFormats.UnicodeText, txt); } - Common.Log("Invalid clipboard format received!"); + Logger.Log("Invalid clipboard format received!"); } textTypeCount++; @@ -1037,26 +1038,26 @@ namespace MouseWithoutBorders SystemClipboard.SetFileDropList(filePaths); return true; }, - (log) => Common.TelemetryLogTrace( + (log) => Logger.TelemetryLogTrace( log, SeverityLevel.Information), () => Common.LastClipboardEventTime = Common.GetTick()); } catch (ExternalException e) { - Common.Log(e); + Logger.Log(e); } catch (ThreadStateException e) { - Common.Log(e); + Logger.Log(e); } catch (ArgumentNullException e) { - Common.Log(e); + Logger.Log(e); } catch (ArgumentException e) { - Common.Log(e); + Logger.Log(e); } }); } @@ -1074,20 +1075,20 @@ namespace MouseWithoutBorders SystemClipboard.SetImage(image); return true; }, - (log) => Common.TelemetryLogTrace(log, SeverityLevel.Information), + (log) => Logger.TelemetryLogTrace(log, SeverityLevel.Information), () => Common.LastClipboardEventTime = Common.GetTick()); } catch (ExternalException e) { - Common.Log(e); + Logger.Log(e); } catch (ThreadStateException e) { - Common.Log(e); + Logger.Log(e); } catch (ArgumentNullException e) { - Common.Log(e); + Logger.Log(e); } }); } @@ -1105,20 +1106,20 @@ namespace MouseWithoutBorders SystemClipboard.SetText(text); return true; }, - (log) => Common.TelemetryLogTrace(log, SeverityLevel.Information), + (log) => Logger.TelemetryLogTrace(log, SeverityLevel.Information), () => Common.LastClipboardEventTime = Common.GetTick()); } catch (ExternalException e) { - Common.Log(e); + Logger.Log(e); } catch (ThreadStateException e) { - Common.Log(e); + Logger.Log(e); } catch (ArgumentNullException e) { - Common.Log(e); + Logger.Log(e); } }); } @@ -1134,15 +1135,15 @@ namespace MouseWithoutBorders catch (ExternalException e) { string dataFormats = string.Join(",", dataObject.GetFormats()); - Common.Log($"{e.Message}: {dataFormats}"); + Logger.Log($"{e.Message}: {dataFormats}"); } catch (ThreadStateException e) { - Common.Log(e); + Logger.Log(e); } catch (ArgumentNullException e) { - Common.Log(e); + Logger.Log(e); } }); } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.DragDrop.cs b/src/modules/MouseWithoutBorders/App/Class/Common.DragDrop.cs index 11d9e5776d..f3ef0f1395 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.DragDrop.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.DragDrop.cs @@ -20,6 +20,7 @@ using Microsoft.PowerToys.Telemetry; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; namespace MouseWithoutBorders { @@ -73,12 +74,12 @@ namespace MouseWithoutBorders MouseDown = true; DragMachine = desMachineID; dropMachineID = ID.NONE; - LogDebug("DragDropStep01: MouseDown"); + Logger.LogDebug("DragDropStep01: MouseDown"); } else if (wParam == WM_LBUTTONUP) { MouseDown = false; - LogDebug("DragDropStep01: MouseUp"); + Logger.LogDebug("DragDropStep01: MouseUp"); } if (wParam == WM_RBUTTONUP && IsDropping) @@ -92,7 +93,7 @@ namespace MouseWithoutBorders { if (desMachineID == MachineID) { - LogDebug("DragDropStep02: SendCheckExplorerDragDrop sent to myself"); + Logger.LogDebug("DragDropStep02: SendCheckExplorerDragDrop sent to myself"); DoSomethingInUIThread(() => { _ = NativeMethods.PostMessage(MainForm.Handle, NativeMethods.WM_CHECK_EXPLORER_DRAG_DROP, (IntPtr)0, (IntPtr)0); @@ -101,7 +102,7 @@ namespace MouseWithoutBorders else { SendCheckExplorerDragDrop(); - LogDebug("DragDropStep02: SendCheckExplorerDragDrop sent"); + Logger.LogDebug("DragDropStep02: SendCheckExplorerDragDrop sent"); } } @@ -114,11 +115,11 @@ namespace MouseWithoutBorders if (package.Des == MachineID || package.Des == ID.ALL) { - LogDebug("DragDropStep03: ExplorerDragDrop Received."); + Logger.LogDebug("DragDropStep03: ExplorerDragDrop Received."); dropMachineID = package.Src; // Drop machine is the machine that sent ExplorerDragDrop if (MouseDown || IsDropping) { - LogDebug("DragDropStep03: Mouse is down, check if dragging...sending WM_CHECK_EXPLORER_DRAG_DROP to myself..."); + Logger.LogDebug("DragDropStep03: Mouse is down, check if dragging...sending WM_CHECK_EXPLORER_DRAG_DROP to myself..."); DoSomethingInUIThread(() => { _ = NativeMethods.PostMessage(MainForm.Handle, NativeMethods.WM_CHECK_EXPLORER_DRAG_DROP, (IntPtr)0, (IntPtr)0); @@ -150,12 +151,12 @@ namespace MouseWithoutBorders { if (dragDropStep05ExCalledByIpc > 0) { - LogDebug("DragDropStep04: DragDropStep05ExCalledByIpc."); + Logger.LogDebug("DragDropStep04: DragDropStep05ExCalledByIpc."); break; } _ = NativeMethods.GetCursorPos(ref p); - LogDebug("DragDropStep04: Moving Mouse Without Borders Helper to (" + p.X.ToString(CultureInfo.CurrentCulture) + ", " + p.Y.ToString(CultureInfo.CurrentCulture) + ")"); + Logger.LogDebug("DragDropStep04: Moving Mouse Without Borders Helper to (" + p.X.ToString(CultureInfo.CurrentCulture) + ", " + p.Y.ToString(CultureInfo.CurrentCulture) + ")"); _ = NativeMethods.SetWindowPos(h, NativeMethods.HWND_TOPMOST, p.X - 100 + i, p.Y - 100 + i, 200, 200, 0); _ = NativeMethods.SendMessage(h, 0x000F, IntPtr.Zero, IntPtr.Zero); // WM_PAINT Thread.Sleep(20); @@ -166,20 +167,20 @@ namespace MouseWithoutBorders } else { - LogDebug("DragDropStep04: Mouse without Borders Helper not found!"); + Logger.LogDebug("DragDropStep04: Mouse without Borders Helper not found!"); } } else { - LogDebug("DragDropStep04: IsDropping == true, skip checking"); + Logger.LogDebug("DragDropStep04: IsDropping == true, skip checking"); } - LogDebug("DragDropStep04: Got WM_CHECK_EXPLORER_DRAG_DROP, done with processing jump to DragDropStep05..."); + Logger.LogDebug("DragDropStep04: Got WM_CHECK_EXPLORER_DRAG_DROP, done with processing jump to DragDropStep05..."); } internal static void DragDropStep05Ex(string dragFileName) { - LogDebug("DragDropStep05 called."); + Logger.LogDebug("DragDropStep05 called."); _ = Interlocked.Exchange(ref dragDropStep05ExCalledByIpc, 1); @@ -204,21 +205,21 @@ namespace MouseWithoutBorders } DragDropStep06(); - LogDebug("DragDropStep05: File dragging: " + dragFileName); + Logger.LogDebug("DragDropStep05: File dragging: " + dragFileName); _ = NativeMethods.PostMessage(MainForm.Handle, NativeMethods.WM_HIDE_DD_HELPER, (IntPtr)1, (IntPtr)0); } else { - LogDebug("DragDropStep05: File not found: [" + dragFileName + "]"); + Logger.LogDebug("DragDropStep05: File not found: [" + dragFileName + "]"); _ = NativeMethods.PostMessage(MainForm.Handle, NativeMethods.WM_HIDE_DD_HELPER, (IntPtr)0, (IntPtr)0); } - LogDebug("DragDropStep05: WM_HIDE_DDHelper sent"); + Logger.LogDebug("DragDropStep05: WM_HIDE_DDHelper sent"); }); } else { - LogDebug("DragDropStep05: IsDropping == true, change drop machine..."); + Logger.LogDebug("DragDropStep05: IsDropping == true, change drop machine..."); IsDropping = false; MainFormVisible = true; // WM_HIDE_DRAG_DROP SendDropBegin(); // To dropMachineID set in DragDropStep03 @@ -230,7 +231,7 @@ namespace MouseWithoutBorders internal static void DragDropStep06() { IsDragging = true; - LogDebug("DragDropStep06: SendClipboardBeatDragDrop"); + Logger.LogDebug("DragDropStep06: SendClipboardBeatDragDrop"); SendClipboardBeatDragDrop(); SendDropBegin(); } @@ -238,7 +239,7 @@ namespace MouseWithoutBorders internal static void DragDropStep08(DATA package) { GetNameOfMachineWithClipboardData(package); - LogDebug("DragDropStep08: ClipboardDragDrop Received. machine with drag file was set"); + Logger.LogDebug("DragDropStep08: ClipboardDragDrop Received. machine with drag file was set"); } internal static void DragDropStep08_2(DATA package) @@ -247,7 +248,7 @@ namespace MouseWithoutBorders { IsDropping = true; dropMachineID = MachineID; - LogDebug("DragDropStep08_2: ClipboardDragDropOperation Received. IsDropping set"); + Logger.LogDebug("DragDropStep08_2: ClipboardDragDropOperation Received. IsDropping set"); } } @@ -278,7 +279,7 @@ namespace MouseWithoutBorders internal static void DragDropStep10() { - LogDebug("DragDropStep10: Hide the form and get data..."); + Logger.LogDebug("DragDropStep10: Hide the form and get data..."); IsDropping = false; IsDragging = false; LastIDWithClipboardData = ID.NONE; @@ -294,7 +295,7 @@ namespace MouseWithoutBorders internal static void DragDropStep11() { - LogDebug("DragDropStep11: Mouse drag coming back, canceling drag/drop"); + Logger.LogDebug("DragDropStep11: Mouse drag coming back, canceling drag/drop"); SendClipboardBeatDragDropEnd(); IsDropping = false; IsDragging = false; @@ -306,7 +307,7 @@ namespace MouseWithoutBorders internal static void DragDropStep12() { - LogDebug("DragDropStep12: ClipboardDragDropEnd received"); + Logger.LogDebug("DragDropStep12: ClipboardDragDropEnd received"); IsDropping = false; LastIDWithClipboardData = ID.NONE; @@ -374,7 +375,7 @@ namespace MouseWithoutBorders internal static void SendDropBegin() { - LogDebug("SendDropBegin..."); + Logger.LogDebug("SendDropBegin..."); SendPackage(dropMachineID, PackageType.ClipboardDragDropOperation); } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs index d557a8223c..1293a4ef39 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs @@ -18,6 +18,8 @@ using System.Linq; using System.Security.Cryptography; using System.Threading.Tasks; +using MouseWithoutBorders.Core; + namespace MouseWithoutBorders { internal partial class Common @@ -25,7 +27,9 @@ namespace MouseWithoutBorders #pragma warning disable SYSLIB0021 private static AesCryptoServiceProvider symAl; #pragma warning restore SYSLIB0021 - private static string myKey; +#pragma warning disable SA1307 // Accessible fields should begin with upper-case letter + internal static string myKey; +#pragma warning restore SA1307 private static uint magicNumber; private static Random ran = new(); // Used for non encryption related functionality. internal const int SymAlBlockSize = 16; @@ -106,7 +110,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -189,7 +193,7 @@ namespace MouseWithoutBorders hashValue = hash.ComputeHash(hashValue); } - Common.LogDebug(string.Format(CultureInfo.CurrentCulture, "magic: {0},{1},{2}", hashValue[0], hashValue[1], hashValue[^1])); + Logger.LogDebug(string.Format(CultureInfo.CurrentCulture, "magic: {0},{1},{2}", hashValue[0], hashValue[1], hashValue[^1])); hash.Clear(); return (uint)((hashValue[0] << 23) + (hashValue[1] << 16) + (hashValue[^1] << 8) + hashValue[2]); } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Event.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Event.cs index 7674ba2296..e50e87b8f9 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Event.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Event.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Form; namespace MouseWithoutBorders @@ -26,8 +27,10 @@ namespace MouseWithoutBorders { private static readonly DATA KeybdPackage = new(); private static readonly DATA MousePackage = new(); - private static ulong inputEventCount; - private static ulong invalidPackageCount; +#pragma warning disable SA1307 // Accessible fields should begin with upper-case names + internal static ulong inputEventCount; + internal static ulong invalidPackageCount; +#pragma warning restore SA1307 internal static int MOVE_MOUSE_RELATIVE = 100000; internal static int XY_BY_PIXEL = 300000; @@ -73,7 +76,7 @@ namespace MouseWithoutBorders { HasSwitchedMachineSinceLastCopy = true; - Common.LogDebug(string.Format( + Logger.LogDebug(string.Format( CultureInfo.CurrentCulture, "***** Host Machine: newDesMachineIdEx set = [{0}]. Mouse is now at ({1},{2})", newDesMachineIdEx, @@ -117,7 +120,7 @@ namespace MouseWithoutBorders if (actualLastPos != Common.LastPos) { - Common.LogDebug($"Mouse cursor has moved unexpectedly: Expected: {Common.LastPos}, actual: {actualLastPos}."); + Logger.LogDebug($"Mouse cursor has moved unexpectedly: Expected: {Common.LastPos}, actual: {actualLastPos}."); Common.LastPos = actualLastPos; } } @@ -138,7 +141,7 @@ namespace MouseWithoutBorders } catch (Exception ex) { - Log(ex); + Logger.Log(ex); } } @@ -149,11 +152,11 @@ namespace MouseWithoutBorders internal static void PrepareToSwitchToMachine(ID newDesMachineID, Point desMachineXY) { - LogDebug($"PrepareToSwitchToMachine: newDesMachineID = {newDesMachineID}, desMachineXY = {desMachineXY}"); + Logger.LogDebug($"PrepareToSwitchToMachine: newDesMachineID = {newDesMachineID}, desMachineXY = {desMachineXY}"); if (((GetTick() - lastJump < 100) && (GetTick() - lastJump > 0)) || desMachineID == ID.ALL) { - LogDebug("PrepareToSwitchToMachine: lastJump"); + Logger.LogDebug("PrepareToSwitchToMachine: lastJump"); return; } @@ -163,7 +166,7 @@ namespace MouseWithoutBorders if (!IsConnectedTo(newDesMachineID)) {// Connection lost, cancel switching - LogDebug("No active connection found for " + newDesMachineName); + Logger.LogDebug("No active connection found for " + newDesMachineName); // ShowToolTip("No active connection found for [" + newDesMachineName + "]!", 500); } @@ -198,7 +201,7 @@ namespace MouseWithoutBorders // Change des machine if (desMachineID != newDesMachineID) { - LogDebug("MouseEvent: Switching to new machine:" + newDesMachineName); + Logger.LogDebug("MouseEvent: Switching to new machine:" + newDesMachineName); // Ask current machine to hide the Mouse cursor if (newDesMachineID != ID.ALL && desMachineID != MachineID) @@ -246,7 +249,7 @@ namespace MouseWithoutBorders PaintCount = 0; if (desMachineID != newDesMachineID) { - LogDebug("KeybdEvent: Switching to new machine..."); + Logger.LogDebug("KeybdEvent: Switching to new machine..."); DesMachineID = newDesMachineID; } @@ -265,7 +268,7 @@ namespace MouseWithoutBorders } catch (Exception ex) { - Log(ex); + Logger.Log(ex); } } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs index 12ee1810a8..ccbec57508 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs @@ -22,7 +22,7 @@ using System.Windows.Forms; // using Microsoft.Win32; using MouseWithoutBorders.Class; - +using MouseWithoutBorders.Core; using static System.Windows.Forms.Control; namespace MouseWithoutBorders @@ -61,7 +61,7 @@ namespace MouseWithoutBorders Process p = Process.GetCurrentProcess(); string procInfo = $"{p.PrivateMemorySize64 / 1024 / 1024}MB, {p.TotalProcessorTime}, {Environment.ProcessorCount}."; string threadStacks = $"{procInfo} {Thread.DumpThreadsStack()}"; - Common.TelemetryLogTrace(threadStacks, SeverityLevel.Error); + Logger.TelemetryLogTrace(threadStacks, SeverityLevel.Error); break; } @@ -95,7 +95,7 @@ namespace MouseWithoutBorders Common.SwitchLocation.Count--; // When we want to move mouse by pixels, we add 300k to x and y (search for XY_BY_PIXEL for other related code). - Common.LogDebug($"+++++ Moving mouse to {Common.SwitchLocation.X}, {Common.SwitchLocation.Y}"); + Logger.LogDebug($"+++++ Moving mouse to {Common.SwitchLocation.X}, {Common.SwitchLocation.Y}"); // MaxXY = 65535 so 100k is safe. if (Common.SwitchLocation.X > XY_BY_PIXEL - 100000 || Common.SwitchLocation.Y > XY_BY_PIXEL - 100000) @@ -119,16 +119,16 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } signalHelperToExit = false; - LogDebug("^^^Helper Thread exiting...^^^"); + Logger.LogDebug("^^^Helper Thread exiting...^^^"); } internal static void MainFormDotEx(bool bCheckTS) { - LogDebug("***** MainFormDotEx:"); + Logger.LogDebug("***** MainFormDotEx:"); if (!Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop) { @@ -178,7 +178,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } } @@ -188,7 +188,7 @@ namespace MouseWithoutBorders internal static void MainForm3Pixels() { - LogDebug("***** MainFormDotLarge:"); + Logger.LogDebug("***** MainFormDotLarge:"); DoSomethingInUIThread( () => @@ -254,7 +254,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -277,7 +277,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); _ = Common.SendMessageToHelper(SharedConst.QUIT_CMD, IntPtr.Zero, IntPtr.Zero); } @@ -291,7 +291,7 @@ namespace MouseWithoutBorders if (!Common.IpcChannelCreated) { - TelemetryLogTrace($"{nameof(Common.IpcChannelCreated)} = {Common.IpcChannelCreated}. {GetStackTrace(new StackTrace())}", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"{nameof(Common.IpcChannelCreated)} = {Common.IpcChannelCreated}. {Logger.GetStackTrace(new StackTrace())}", SeverityLevel.Warning); return; } @@ -317,12 +317,12 @@ namespace MouseWithoutBorders var processes = Process.GetProcessesByName(HelperProcessName); if (processes?.Length == 0) { - Log("Unable to start helper process."); + Logger.Log("Unable to start helper process."); Common.ShowToolTip("Error starting Mouse Without Borders Helper, clipboard sharing will not work!", 5000, ToolTipIcon.Error); } else { - Log("Helper process started."); + Logger.Log("Helper process started."); } } else @@ -330,11 +330,11 @@ namespace MouseWithoutBorders var processes = Process.GetProcessesByName(HelperProcessName); if (processes?.Length > 0) { - Log("Helper process found running."); + Logger.Log("Helper process found running."); } else { - Log("Invalid helper process found running."); + Logger.Log("Invalid helper process found running."); Common.ShowToolTip("Error finding Mouse Without Borders Helper, clipboard sharing will not work!", 5000, ToolTipIcon.Error); } } @@ -354,7 +354,7 @@ namespace MouseWithoutBorders if (log) { - Common.LogDebug($"SendMessageToHelper: HelperWindow={h}, Return={rv}, msg={msg}, w={wparam.ToInt32()}, l={lparam.ToInt32()}, Post={!wait}"); + Logger.LogDebug($"SendMessageToHelper: HelperWindow={h}, Return={rv}, msg={msg}, w={wparam.ToInt32()}, l={lparam.ToInt32()}, Post={!wait}"); } return rv; @@ -424,7 +424,7 @@ namespace MouseWithoutBorders log += "Last 10 trace messages:\r\n"; - log += string.Join(Environment.NewLine, LogCounter.Select(item => $"({item.Value}): {item.Key}").Take(10)); + log += string.Join(Environment.NewLine, Logger.LogCounter.Select(item => $"({item.Value}): {item.Key}").Take(10)); log += "\r\n============================================================================================================================="; @@ -447,7 +447,7 @@ namespace MouseWithoutBorders Setting.Values.Username = Program.User; } - Common.LogDebug("[Username] = " + Setting.Values.Username); + Logger.LogDebug("[Username] = " + Setting.Values.Username); } return !string.IsNullOrEmpty(Setting.Values.Username); @@ -490,7 +490,7 @@ Please use the keyboard and Mouse from the SAW device. } catch (Exception e) { - Log(e); + Logger.Log(e); } } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.InitAndCleanup.cs b/src/modules/MouseWithoutBorders/App/Class/Common.InitAndCleanup.cs index 2c7f271b61..da52a60db2 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.InitAndCleanup.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.InitAndCleanup.cs @@ -19,6 +19,7 @@ using System.Threading; // using Microsoft.Win32; using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Form; using Windows.UI.Input.Preview.Injection; @@ -61,7 +62,7 @@ namespace MouseWithoutBorders } catch (Exception ex) { - Common.Log(ex); + Logger.Log(ex); Common.MachinePool.Clear(); } } @@ -84,7 +85,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -102,13 +103,13 @@ namespace MouseWithoutBorders { Common.KeyCorrupted = true; Setting.Values.MyKey = Common.MyKey = Common.CreateRandomKey(); - Common.Log(e.Message); + Logger.Log(e.Message); } catch (CryptographicException e) { Common.KeyCorrupted = true; Setting.Values.MyKey = Common.MyKey = Common.CreateRandomKey(); - Common.Log(e.Message); + Logger.Log(e.Message); } try @@ -123,7 +124,7 @@ namespace MouseWithoutBorders catch (EntryPointNotFoundException) { NativeMethods.InjectMouseInputAvailable = false; - Common.Log($"{nameof(NativeMethods.InjectMouseInputAvailable)} = false"); + Logger.Log($"{nameof(NativeMethods.InjectMouseInputAvailable)} = false"); } bool dummy = Setting.Values.DrawMouseEx; @@ -149,7 +150,7 @@ namespace MouseWithoutBorders if (e.Mode is PowerModes.Resume or PowerModes.Suspend) { - Common.TelemetryLogTrace($"{nameof(SystemEvents_PowerModeChanged)}: {e.Mode}", SeverityLevel.Information); + Logger.TelemetryLogTrace($"{nameof(SystemEvents_PowerModeChanged)}: {e.Mode}", SeverityLevel.Information); LastResumeSuspendTime = DateTime.UtcNow; SwitchToMultipleMode(false, true); } @@ -206,7 +207,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -230,13 +231,13 @@ namespace MouseWithoutBorders VK.RCONTROL, VK.RMENU, VK.RWIN, VK.SHIFT, VK.MENU, VK.CONTROL, }; - LogDebug("***** ReleaseAllKeys has been called! *****:"); + Logger.LogDebug("***** ReleaseAllKeys has been called! *****:"); foreach (VK vk in keys) { if ((NativeMethods.GetAsyncKeyState((IntPtr)vk) & 0x8000) != 0) { - LogDebug(vk.ToString() + " is down, release it..."); + Logger.LogDebug(vk.ToString() + " is down, release it..."); Hook?.ResetLastSwitchKeys(); // Sticky key can turn ALL PC mode on (CtrlCtrlCtrl) kd.wVk = (int)vk; InputSimulation.SendKey(kd); @@ -247,7 +248,7 @@ namespace MouseWithoutBorders private static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { - LogDebug("NetworkAvailabilityEventArgs.IsAvailable: " + e.IsAvailable.ToString(CultureInfo.InvariantCulture)); + Logger.LogDebug("NetworkAvailabilityEventArgs.IsAvailable: " + e.IsAvailable.ToString(CultureInfo.InvariantCulture)); Common.WndProcCounter++; ScheduleReopenSocketsDueToNetworkChanges(!e.IsAvailable); } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Launch.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Launch.cs index 80ffe9fd84..5704e6119d 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Launch.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Launch.cs @@ -19,6 +19,7 @@ using System.Security.Principal; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; namespace MouseWithoutBorders { @@ -44,17 +45,17 @@ namespace MouseWithoutBorders { dwSessionId = (uint)Process.GetCurrentProcess().SessionId; uint rv = NativeMethods.WTSQueryUserToken(dwSessionId, ref hUserToken); - LogDebug("WTSQueryUserToken returned " + rv.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("WTSQueryUserToken returned " + rv.ToString(CultureInfo.CurrentCulture)); if (rv == 0) { - LogDebug($"WTSQueryUserToken failed with: {Marshal.GetLastWin32Error()}."); + Logger.LogDebug($"WTSQueryUserToken failed with: {Marshal.GetLastWin32Error()}."); return false; } if (!NativeMethods.DuplicateToken(hUserToken, (int)NativeMethods.SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation, ref hUserTokenDup)) { - TelemetryLogTrace($"DuplicateToken Failed! {GetStackTrace(new StackTrace())}", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"DuplicateToken Failed! {Logger.GetStackTrace(new StackTrace())}", SeverityLevel.Warning); _ = NativeMethods.CloseHandle(hUserToken); _ = NativeMethods.CloseHandle(hUserTokenDup); return false; @@ -70,7 +71,7 @@ namespace MouseWithoutBorders } else { - Log("ImpersonateLoggedOnUser Failed!"); + Logger.Log("ImpersonateLoggedOnUser Failed!"); _ = NativeMethods.CloseHandle(hUserToken); _ = NativeMethods.CloseHandle(hUserTokenDup); return false; @@ -78,7 +79,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); return false; } } @@ -102,7 +103,7 @@ namespace MouseWithoutBorders int dwSessionId; IntPtr hUserToken = IntPtr.Zero, hUserTokenDup = IntPtr.Zero; - Common.LogDebug("CreateProcessInInputDesktopSession called, launching " + commandLineWithArg + " on " + desktop); + Logger.LogDebug("CreateProcessInInputDesktopSession called, launching " + commandLineWithArg + " on " + desktop); try { @@ -122,7 +123,7 @@ namespace MouseWithoutBorders if (!NativeMethods.DuplicateTokenEx(hUserToken, NativeMethods.MAXIMUM_ALLOWED, ref sa, (int)NativeMethods.SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, (int)NativeMethods.TOKEN_TYPE.TokenPrimary, ref hUserTokenDup)) { lastError = Marshal.GetLastWin32Error(); - Common.Log(string.Format(CultureInfo.CurrentCulture, "DuplicateTokenEx error: {0} Token does not have the privilege.", lastError)); + Logger.Log(string.Format(CultureInfo.CurrentCulture, "DuplicateTokenEx error: {0} Token does not have the privilege.", lastError)); _ = NativeMethods.CloseHandle(hUserToken); return 0; } @@ -138,7 +139,7 @@ namespace MouseWithoutBorders if (!rv) { - Log("ConvertStringSidToSid failed"); + Logger.Log("ConvertStringSidToSid failed"); _ = NativeMethods.CloseHandle(hUserToken); _ = NativeMethods.CloseHandle(hUserTokenDup); return 0; @@ -151,7 +152,7 @@ namespace MouseWithoutBorders if (!rv) { - Log("SetTokenInformation failed"); + Logger.Log("SetTokenInformation failed"); _ = NativeMethods.CloseHandle(hUserToken); _ = NativeMethods.CloseHandle(hUserTokenDup); return 0; @@ -185,7 +186,7 @@ namespace MouseWithoutBorders // GetLastError should be 0 int iResultOfCreateProcessAsUser = Marshal.GetLastWin32Error(); - LogDebug("CreateProcessAsUser returned " + iResultOfCreateProcessAsUser.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("CreateProcessAsUser returned " + iResultOfCreateProcessAsUser.ToString(CultureInfo.CurrentCulture)); // Close handles task _ = NativeMethods.CloseHandle(hUserToken); @@ -195,7 +196,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); return 0; } } @@ -223,19 +224,19 @@ namespace MouseWithoutBorders { if ((p = Process.GetProcessById(processId)) == null) { - Log("Process exited!"); + Logger.Log("Process exited!"); break; } } catch (ArgumentException) { - Log("GetProcessById.ArgumentException"); + Logger.Log("GetProcessById.ArgumentException"); break; } if ((!p.HasExited && p.PrivateMemorySize64 > limitedMem) || (++sec > (wait / 1000))) { - Log(string.Format(CultureInfo.CurrentCulture, "Process log (mem): {0}, {1}", sec, p.PrivateMemorySize64)); + Logger.Log(string.Format(CultureInfo.CurrentCulture, "Process log (mem): {0}, {1}", sec, p.PrivateMemorySize64)); return false; } @@ -248,11 +249,11 @@ namespace MouseWithoutBorders if ((p = Process.GetProcessById(processId)) == null) { - Log("Process exited!"); + Logger.Log("Process exited!"); } else if (NativeMethods.WaitForSingleObject(p.Handle, wait) != NativeMethods.WAIT_OBJECT_0 && killIfTimedOut) { - Log("Process log (time)."); + Logger.Log("Process log (time)."); TerminateProcessTree(p.Handle, (uint)processId, -1); return false; } @@ -287,12 +288,12 @@ namespace MouseWithoutBorders } catch (InvalidOperationException e) { - Log(e); + Logger.Log(e); continue; } catch (Win32Exception e) { - Log(e); + Logger.Log(e); continue; } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Log.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Log.cs index 02e65d3891..df7518fdb5 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Log.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Log.cs @@ -25,6 +25,7 @@ using System.Windows.Forms; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Exceptions; namespace MouseWithoutBorders @@ -81,7 +82,7 @@ namespace MouseWithoutBorders internal static string DumpThreadsStack() { string stack = "\r\nMANAGED THREADS: " + threads.Count.ToString(CultureInfo.InvariantCulture) + "\r\n"; - stack += Common.GetStackTrace(new StackTrace()); + stack += Logger.GetStackTrace(new StackTrace()); return stack; } @@ -115,385 +116,4 @@ namespace MouseWithoutBorders internal System.Threading.ThreadState ThreadState => thread.ThreadState; } - - internal partial class Common - { - private static readonly string[] AllLogs = new string[MAX_LOG]; - private static readonly object AllLogsLock = new(); - private static readonly ConcurrentDictionary LogCounter = new(); - private static readonly int[] RepeatedLogIndexSelection = new[] { 1, 3, 10, 50, 100 }; - private const int MAX_LOG = 10000; - private static int allLogsIndex; - - private const int MaxLogExceptionPerHour = 1000; - private static int lastHour; - private static int exceptionCount; - - internal static void TelemetryLogTrace(string log, SeverityLevel severityLevel, bool flush = false) - { - int logCount = LogCounter.AddOrUpdate(log, 1, (key, value) => value + 1); - Common.Log(log); - } - - internal static void Log(Exception e) - { - if (e is not KnownException) - { - string exText = e.ToString(); - - Log($"!Exception!: {exText}"); - - if (DateTime.UtcNow.Hour != lastHour) - { - lastHour = DateTime.UtcNow.Hour; - exceptionCount = 0; - } - - if (exceptionCount < MaxLogExceptionPerHour) - { - exceptionCount++; - } - else if (exceptionCount != short.MaxValue) - { - exceptionCount = short.MaxValue; - } - } - } - - private const string HeaderSENT = - "Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13}"; - - private const string HeaderRECEIVED = - "Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15}"; - - internal static void LogDebug(string log, bool clearLog = false) - { -#if DEBUG - Log(log, clearLog); -#endif - } - - internal static void Log(string log, bool clearLog = false) - { - log = DateTime.Now.ToString("MM/dd HH:mm:ss.fff", CultureInfo.InvariantCulture) + $"({Thread.CurrentThread.ManagedThreadId})" + log; - - ManagedCommon.Logger.LogInfo(log); - lock (AllLogsLock) - { - if (clearLog) - { - allLogsIndex = 0; - } - - AllLogs[allLogsIndex] = log; - allLogsIndex = (allLogsIndex + 1) % MAX_LOG; - } - } - - internal static void LogDebug(string format, params object[] args) - { -#if DEBUG - Log(format, args); -#endif - } - - internal static void Log(string format, params object[] args) - { - Common.Log(string.Format(CultureInfo.InvariantCulture, format, args)); - } - - private static PackageMonitor p1; - private static PackageMonitor p2; - - [Conditional("DEBUG")] - internal static void LogAll() - { - string log; - - if (!p1.Equals(PackageSent)) - { - log = string.Format( - CultureInfo.CurrentCulture, - "SENT:" + HeaderSENT, - PackageSent.Heartbeat, - PackageSent.Keyboard, - PackageSent.Mouse, - PackageSent.Hello, - PackageSent.Matrix, - PackageSent.ClipboardText, - PackageSent.ClipboardImage, - PackageSent.ByeBye, - PackageSent.Clipboard, - PackageSent.ClipboardDragDrop, - PackageSent.ClipboardDragDropEnd, - PackageSent.ExplorerDragDrop, - inputEventCount, - PackageSent.Nil); - Log(log); - p1 = PackageSent; // Copy data - } - - if (!p2.Equals(PackageReceived)) - { - log = string.Format( - CultureInfo.CurrentCulture, - "RECEIVED:" + HeaderRECEIVED, - PackageReceived.Heartbeat, - PackageReceived.Keyboard, - PackageReceived.Mouse, - PackageReceived.Hello, - PackageReceived.Matrix, - PackageReceived.ClipboardText, - PackageReceived.ClipboardImage, - PackageReceived.ByeBye, - PackageReceived.Clipboard, - PackageReceived.ClipboardDragDrop, - PackageReceived.ClipboardDragDropEnd, - PackageReceived.ExplorerDragDrop, - invalidPackageCount, - PackageReceived.Nil, - processedPackageCount, - skippedPackageCount); - Log(log); - p2 = PackageReceived; - } - } - - internal static void GenerateLog() - { - int l = Setting.Values.DumpObjectsLevel; - if (l is > 0 and < 10) - { - Common.DumpObjects(l); - } - } - - private static List myThreads; - - internal static void DumpObjects(int level) - { - try - { - string logFile = Path.Combine(Common.RunWithNoAdminRight ? Path.GetTempPath() : Path.GetDirectoryName(Application.ExecutablePath), "MagicMouse.log"); - - StringBuilder sb = new(1000000); - string log; - - myThreads = new List(); - - foreach (ProcessThread t in Process.GetCurrentProcess().Threads) - { - myThreads.Add(t); - } - - _ = PrivateDump(sb, AllLogs, "[Program logs]\r\n===============\r\n", 0, level, false); - _ = PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, level, false); - - log = string.Format( - CultureInfo.CurrentCulture, - "{0} {1}\r\n{2}\r\n\r\n{3}", - Application.ProductName, - Application.ProductVersion, - "Private Mem: " + (Process.GetCurrentProcess().PrivateMemorySize64 / 1024).ToString(CultureInfo.CurrentCulture) + "KB", - sb.ToString()); - - if (!string.IsNullOrEmpty(myKey)) - { - log = log.Replace(MyKey, GetDebugInfo(MyKey)); - } - - log += Thread.DumpThreadsStack(); - log += $"\r\nCurrent process session: {Process.GetCurrentProcess().SessionId}, active console session: {NativeMethods.WTSGetActiveConsoleSessionId()}."; - - File.WriteAllText(logFile, log); - - if (RunOnLogonDesktop || RunOnScrSaverDesktop) - { - _ = MessageBox.Show("Dump file created: " + logFile, Application.ProductName); - } - else - { - ShowToolTip("Dump file created: " + logFile + " and placed in the Clipboard.", 10000); - Clipboard.SetText(logFile); - } - } - catch (Exception e) - { - _ = MessageBox.Show(e.Message + "\r\n" + e.StackTrace, Application.ProductName); - } - } - - private static object GetFieldValue(object obj, string fieldName) - { - FieldInfo fi; - Type t; - - t = obj.GetType(); - fi = t.GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); - return fi?.GetValue(obj); - } - - private static bool PrivateDump(StringBuilder sb, object obj, string objName, int level, int maxLevel, bool stop) - { - Type t; - string padStr = string.Empty; - string[] strArr; - string objString; - - if (obj == null || (maxLevel >= 0 && level >= maxLevel) || obj is Cursor) - { - return false; - } - - for (int i = 0; i < level; i++) - { - padStr += i < level - 1 ? "-" : padStr += string.Empty; - } - - objString = obj.ToString(); - t = obj.GetType(); - strArr = new string[7]; - strArr[0] = padStr; - strArr[1] = objName; - - // strArr[2] = " "; - // strArr[3] = t.FullName; - strArr[4] = " = "; - strArr[5] = objName.Equals("myKey", StringComparison.OrdinalIgnoreCase) ? GetDebugInfo(objString) - : objName.Equals("lastClipboardObject", StringComparison.OrdinalIgnoreCase) ? string.Empty - : objString.Replace("System.Windows.Forms.", string.Empty).Replace("System.Net.Sockets.", string.Empty).Replace("System.Security.Cryptography.", string.Empty).Replace("System.Threading.", string.Empty) - .Replace("System.ComponentModel.", string.Empty).Replace("System.Runtime.", string.Empty).Replace("System.Drawing.", string.Empty).Replace("System.Object", "O").Replace("System.Diagnostics.", string.Empty) - .Replace("System.Collections.", string.Empty).Replace("System.Drawing.", string.Empty).Replace("System.Int", string.Empty).Replace("System.EventHandler.", string.Empty); - strArr[6] = "\r\n"; - _ = sb.Append(string.Concat(strArr).Replace(Common.BinaryName, "MM")); - - if (stop || t.IsPrimitive) - { - return false; - } - - DumpType(padStr, sb, obj, level, t, maxLevel); - return true; - } - - private static void DumpType(string initialStr, StringBuilder sb, object obj, int level, System.Type t, int maxLevel) - { - int i; - bool stop; - if (t == typeof(System.Delegate)) - { - return; - } - - FieldInfo[] fi; - string type; - - if (obj is MouseWithoutBorders.PackageType or string or AddressFamily or ID or IPAddress - ) - { - return; - } - - type = obj.GetType().ToString(); - - if (type.EndsWith("type", StringComparison.CurrentCultureIgnoreCase) || type.Contains("Cryptography") - || type.EndsWith("AsyncEventBits", StringComparison.CurrentCultureIgnoreCase)) - { - return; - } - - stop = obj == null || obj is MouseWithoutBorders.DATA || obj.GetType().BaseType == typeof(ValueType) - || obj.GetType().Namespace.Contains("System.Windows"); - fi = t.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); - - foreach (FieldInfo f in fi) - { - if (f.GetValue(obj) != AllLogs) - { - _ = PrivateDump(sb, f.GetValue(obj), f.Name, level + 1, maxLevel, stop); - } - } - - if (obj is Dictionary>) - { - Dictionary> d = obj as Dictionary>; - - foreach (string k in d.Keys) - { - if (d.TryGetValue(k, out List l)) - { - foreach (IPAddress ip in l) - { - _ = PrivateDump(sb, ip, "[" + k + "]", level + 1, maxLevel, false); - } - } - } - } - - if (obj is System.Array) - { - try - { - if (obj is MachineInf[]) - { - MachineInf[] os = (MachineInf[])obj; - - for (i = 0; i < os.GetLength(0); i++) - { - _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); - } - } - else if (obj is int[] || obj is uint[]) - { - int[] os = (int[])obj; - - for (i = 0; i < os.GetLength(0); i++) - { - _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); - } - } - else if (obj is short[] || obj is ushort[]) - { - short[] os = (short[])obj; - - for (i = 0; i < os.GetLength(0); i++) - { - _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); - } - } - else if (obj is TcpClient[] || obj is IPAddress[] || obj is TcpSk[] || obj is string[] - || obj is TcpServer[] - || obj is ProcessThread[] || obj is Thread[]) - { - object[] os = (object[])obj; - - for (i = 0; i < os.GetLength(0); i++) - { - _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); - } - } - else - { - _ = PrivateDump(sb, obj.GetType().ToString() + ": N/A", obj.GetType().ToString(), level + 1, maxLevel, false); - } - } - catch (Exception) - { - } - } - } - - internal static string GetStackTrace(StackTrace st) - { - string rv = string.Empty; - - for (int i = 0; i < st.FrameCount; i++) - { - StackFrame sf = st.GetFrame(i); - rv += sf.GetMethod() + " <= "; - } - - return rv; - } - } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.MachineStuff.cs b/src/modules/MouseWithoutBorders/App/Class/Common.MachineStuff.cs index d2f79e931f..2088fa0b8f 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.MachineStuff.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.MachineStuff.cs @@ -22,6 +22,7 @@ using Microsoft.PowerToys.Telemetry; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; namespace MouseWithoutBorders { @@ -390,7 +391,7 @@ namespace MouseWithoutBorders // THIS LOGIC IS THE SAME FOR Move*(int x, int y) METHODS. if (newDesMachineIdEx != desMachineID) { - LogDebug("Move Right"); + Logger.LogDebug("Move Right"); if (!Setting.Values.MoveMouseRelatively) { @@ -529,7 +530,7 @@ namespace MouseWithoutBorders if (newDesMachineIdEx != desMachineID) { - LogDebug("Move Left"); + Logger.LogDebug("Move Left"); return !Setting.Values.MoveMouseRelatively ? newDesMachineIdEx == MachineID @@ -598,7 +599,7 @@ namespace MouseWithoutBorders if (newDesMachineIdEx != desMachineID) { - LogDebug("Move Up"); + Logger.LogDebug("Move Up"); return !Setting.Values.MoveMouseRelatively ? newDesMachineIdEx == MachineID @@ -668,7 +669,7 @@ namespace MouseWithoutBorders if (newDesMachineIdEx != desMachineID) { - LogDebug("Move Down"); + Logger.LogDebug("Move Down"); return !Setting.Values.MoveMouseRelatively ? newDesMachineIdEx == MachineID @@ -696,7 +697,7 @@ namespace MouseWithoutBorders rv = true; } - LogDebug("<><><><><>>><><><<><><><><><><><><><><>><><><><><><><><><><><" + inf.Name); + Logger.LogDebug("<><><><><>>><><><<><><><><><><><><><><>><><><><><><><><><><><" + inf.Name); } } @@ -740,7 +741,7 @@ namespace MouseWithoutBorders if (machineInfo.Name.Equals(DesMachineName, StringComparison.OrdinalIgnoreCase)) { - LogDebug("AddToMachinePool: Des ID updated: " + DesMachineID.ToString() + "/" + package.Src.ToString()); + Logger.LogDebug("AddToMachinePool: Des ID updated: " + DesMachineID.ToString() + "/" + package.Src.ToString()); newDesMachineID = desMachineID = package.Src; } @@ -754,7 +755,7 @@ namespace MouseWithoutBorders } else { - LogDebug("AddToMachinePool: could not add a new machine: " + name); + Logger.LogDebug("AddToMachinePool: could not add a new machine: " + name); return "The 5th machine"; } } @@ -781,14 +782,14 @@ namespace MouseWithoutBorders Common.ReopenSockets(true); Common.SendMachineMatrix(); - LogDebug("Machine added: " + name + "/" + package.Src.ToString()); + Logger.LogDebug("Machine added: " + name + "/" + package.Src.ToString()); UpdateClientSockets("AddToMachinePool"); return name; } internal static void UpdateClientSockets(string logHeader) { - LogDebug("UpdateClientSockets: " + logHeader); + Logger.LogDebug("UpdateClientSockets: " + logHeader); Sk?.UpdateTCPClients(); } @@ -802,13 +803,13 @@ namespace MouseWithoutBorders internal static void ShowSetupForm(bool reopenSockets = false) { - Common.LogDebug("========== BEGIN THE SETUP EXPERIENCE ==========", true); + Logger.LogDebug("========== BEGIN THE SETUP EXPERIENCE ==========", true); Setting.Values.MyKey = Common.MyKey = Common.CreateRandomKey(); Common.GeneratedKey = true; if (Process.GetCurrentProcess().SessionId != NativeMethods.WTSGetActiveConsoleSessionId()) { - Common.Log("Not physical console session."); + Logger.Log("Not physical console session."); _ = MessageBox.Show( "Please run the program in the physical console session.\r\nThe program does not work in a remote desktop or virtual machine session.", Application.ProductName, @@ -948,7 +949,7 @@ namespace MouseWithoutBorders { bool twoRow = !Setting.Values.MatrixOneRow; string[] connectedMachines = twoRow ? MachineMatrix : MachineMatrix.Select(m => IsConnectedTo(IdFromName(m)) ? m : string.Empty).ToArray(); - LogDebug($"Matrix: {string.Join(",", MachineMatrix)}, Connected: {string.Join(",", connectedMachines)}"); + Logger.LogDebug($"Matrix: {string.Join(",", MachineMatrix)}, Connected: {string.Join(",", connectedMachines)}"); return connectedMachines; } @@ -981,7 +982,7 @@ namespace MouseWithoutBorders SkSend(package, null, false); - LogDebug($"matrixIncludedMachine sent: [{i + 1}]:[{MachineMatrix[i]}]"); + Logger.LogDebug($"matrixIncludedMachine sent: [{i + 1}]:[{MachineMatrix[i]}]"); } } @@ -992,7 +993,7 @@ namespace MouseWithoutBorders if (i is > 0 and <= MAX_MACHINE) { - LogDebug($"matrixIncludedMachine: [{i}]:[{matrixIncludedMachine}]"); + Logger.LogDebug($"matrixIncludedMachine: [{i}]:[{matrixIncludedMachine}]"); MachineMatrix[i - 1] = matrixIncludedMachine; @@ -1011,7 +1012,7 @@ namespace MouseWithoutBorders } else { - LogDebug("Invalid machine Matrix package!"); + Logger.LogDebug("Invalid machine Matrix package!"); } } @@ -1080,7 +1081,7 @@ namespace MouseWithoutBorders if (!created) { - TelemetryLogTrace($"Second instance found: {eventName}.", SeverityLevel.Warning, true); + Logger.TelemetryLogTrace($"Second instance found: {eventName}.", SeverityLevel.Warning, true); CurrentProcess.KillProcess(true); } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Receiver.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Receiver.cs index b4d2af42f4..5b17801450 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Receiver.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Receiver.cs @@ -20,6 +20,7 @@ using System.Windows.Forms; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; [module: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "MouseWithoutBorders.Common.#PreProcess(MouseWithoutBorders.DATA)", Justification = "Dotnet port with style preservation")] @@ -30,8 +31,10 @@ namespace MouseWithoutBorders private static readonly uint QUEUE_SIZE = 50; private static readonly int[] RecentProcessedPackageIDs = new int[QUEUE_SIZE]; private static int recentProcessedPackageIndex; - private static long processedPackageCount; - private static long skippedPackageCount; +#pragma warning disable SA1307 // Accessible fields should begin with upper-case letter + internal static long processedPackageCount; + internal static long skippedPackageCount; +#pragma warning restore SA1307 internal static long JustGotAKey { get; set; } @@ -45,12 +48,12 @@ namespace MouseWithoutBorders } Common.InvalidPackageCount++; - Common.Log("Invalid packages received!"); + Logger.Log("Invalid packages received!"); return false; } else if (package.Type == 0) { - Common.Log("Got an unknown package!"); + Logger.Log("Got an unknown package!"); return false; } else if (package.Type is not PackageType.ClipboardText and not PackageType.ClipboardImage @@ -157,7 +160,7 @@ namespace MouseWithoutBorders { HasSwitchedMachineSinceLastCopy = true; - Common.LogDebug(string.Format( + Logger.LogDebug(string.Format( CultureInfo.CurrentCulture, "***** Controlled Machine: newDesMachineIdEx set = [{0}]. Mouse is now at ({1},{2})", newDesMachineIdEx, @@ -191,7 +194,7 @@ namespace MouseWithoutBorders break; case PackageType.NextMachine: - LogDebug("PackageType.NextMachine received!"); + Logger.LogDebug("PackageType.NextMachine received!"); if (IsSwitchingByMouseEnabled()) { @@ -334,7 +337,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } }); } @@ -395,7 +398,7 @@ namespace MouseWithoutBorders else { // We should never get to this point! - Common.Log("Invalid package received!"); + Logger.Log("Invalid package received!"); return; } } @@ -421,7 +424,7 @@ namespace MouseWithoutBorders private static void SignalBigClipboardData() { - LogDebug("SignalBigClipboardData"); + Logger.LogDebug("SignalBigClipboardData"); SetToggleIcon(new int[TOGGLE_ICONS_SIZE] { ICON_BIG_CLIPBOARD, -1, ICON_BIG_CLIPBOARD, -1 }); } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Service.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Service.cs index 1b65270fd0..a5a71baf5c 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.Service.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.Service.cs @@ -21,6 +21,7 @@ using System.Windows.Forms; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; [module: SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions", Scope = "member", Target = "MouseWithoutBorders.Common.#StartMouseWithoutBordersService()", Justification = "Dotnet port with style preservation")] @@ -39,7 +40,7 @@ namespace MouseWithoutBorders return; } - Log($"{nameof(StartMouseWithoutBordersService)}: {GetStackTrace(new StackTrace())}."); + Logger.Log($"{nameof(StartMouseWithoutBordersService)}: {Logger.GetStackTrace(new StackTrace())}."); Task task = Task.Run(() => { @@ -49,13 +50,13 @@ namespace MouseWithoutBorders { if (DateTime.UtcNow - lastStartServiceTime < TimeSpan.FromSeconds(5)) { - Log($"{nameof(StartMouseWithoutBordersService)}: Aborted."); + Logger.Log($"{nameof(StartMouseWithoutBordersService)}: Aborted."); return; } foreach (Process pp in ps) { - Common.Log(string.Format(CultureInfo.InvariantCulture, "Killing process MouseWithoutBordersSvc {0}.", pp.Id)); + Logger.Log(string.Format(CultureInfo.InvariantCulture, "Killing process MouseWithoutBordersSvc {0}.", pp.Id)); pp.KillProcess(); } } @@ -65,7 +66,7 @@ namespace MouseWithoutBorders try { - Log("Starting " + service.ServiceName); + Logger.Log("Starting " + service.ServiceName); } catch (Exception) { @@ -104,7 +105,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); // ERROR_SERVICE_ALREADY_RUNNING if (!(shownErrMessage || ((e?.InnerException as Win32Exception)?.NativeErrorCode == 1056))) @@ -153,7 +154,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log($"{nameof(StartServiceAndSendLogoffSignal)}: {e.Message}"); + Logger.Log($"{nameof(StartServiceAndSendLogoffSignal)}: {e.Message}"); } } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs b/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs index 96b605c5b1..8a562e3b70 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs @@ -7,6 +7,8 @@ using System.Diagnostics; using ManagedCommon; +using Logger = MouseWithoutBorders.Core.Logger; + namespace MouseWithoutBorders { internal class ShutdownWithPowerToys @@ -22,7 +24,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.WinAPI.cs b/src/modules/MouseWithoutBorders/App/Class/Common.WinAPI.cs index 775945cc34..722590ef81 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.WinAPI.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.WinAPI.cs @@ -21,6 +21,7 @@ using System.Windows.Forms; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; namespace MouseWithoutBorders { @@ -52,19 +53,19 @@ namespace MouseWithoutBorders { // For logging only _ = NativeMethods.GetDpiForMonitor(hMonitor, 0, out uint dpiX, out uint dpiY); - Log(string.Format(CultureInfo.CurrentCulture, "MONITOR: ({0}, {1}, {2}, {3}). DPI: ({4}, {5})", mi.rcMonitor.Left, mi.rcMonitor.Top, mi.rcMonitor.Right, mi.rcMonitor.Bottom, dpiX, dpiY)); + Logger.Log(string.Format(CultureInfo.CurrentCulture, "MONITOR: ({0}, {1}, {2}, {3}). DPI: ({4}, {5})", mi.rcMonitor.Left, mi.rcMonitor.Top, mi.rcMonitor.Right, mi.rcMonitor.Bottom, dpiX, dpiY)); } catch (DllNotFoundException) { - Common.Log("GetDpiForMonitor is unsupported in Windows 7 and lower."); + Logger.Log("GetDpiForMonitor is unsupported in Windows 7 and lower."); } catch (EntryPointNotFoundException) { - Common.Log("GetDpiForMonitor is unsupported in Windows 7 and lower."); + Logger.Log("GetDpiForMonitor is unsupported in Windows 7 and lower."); } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } if (mi.rcMonitor.Left == 0 && mi.rcMonitor.Top == 0 && mi.rcMonitor.Right != 0 && mi.rcMonitor.Bottom != 0) @@ -116,7 +117,7 @@ namespace MouseWithoutBorders { try { - Common.LogDebug("==================== GetScreenConfig started"); + Logger.LogDebug("==================== GetScreenConfig started"); newDesktopBounds = new MyRectangle(); newPrimaryScreenBounds = new MyRectangle(); newDesktopBounds.Left = newPrimaryScreenBounds.Left = Screen.PrimaryScreen.Bounds.Left; @@ -124,7 +125,7 @@ namespace MouseWithoutBorders newDesktopBounds.Right = newPrimaryScreenBounds.Right = Screen.PrimaryScreen.Bounds.Right; newDesktopBounds.Bottom = newPrimaryScreenBounds.Bottom = Screen.PrimaryScreen.Bounds.Bottom; - Common.Log(string.Format( + Logger.Log(string.Format( CultureInfo.CurrentCulture, "logon = {0} PrimaryScreenBounds = {1},{2},{3},{4} desktopBounds = {5},{6},{7},{8}", Common.RunOnLogonDesktop, @@ -162,7 +163,7 @@ namespace MouseWithoutBorders Interlocked.Exchange(ref desktopBounds, newDesktopBounds); Interlocked.Exchange(ref primaryScreenBounds, newPrimaryScreenBounds); - Common.Log(string.Format( + Logger.Log(string.Format( CultureInfo.CurrentCulture, "logon = {0} PrimaryScreenBounds = {1},{2},{3},{4} desktopBounds = {5},{6},{7},{8}", Common.RunOnLogonDesktop, @@ -175,11 +176,11 @@ namespace MouseWithoutBorders Common.DesktopBounds.Right, Common.DesktopBounds.Bottom)); - Common.Log("==================== GetScreenConfig ended"); + Logger.Log("==================== GetScreenConfig ended"); } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -265,7 +266,7 @@ namespace MouseWithoutBorders { if (!Common.RunWithNoAdminRight) { - LogDebug("*** Starting on active Desktop: " + desktopToRunMouseWithoutBordersOn); + Logger.LogDebug("*** Starting on active Desktop: " + desktopToRunMouseWithoutBordersOn); StartMouseWithoutBordersService(desktopToRunMouseWithoutBordersOn); } } @@ -282,19 +283,19 @@ namespace MouseWithoutBorders while (NativeMethods.WTSGetActiveConsoleSessionId() == 0xFFFFFFFF && waitCount > 0) { waitCount--; - LogDebug("The session is detached/attached."); + Logger.LogDebug("The session is detached/attached."); Thread.Sleep(500); } string myDesktop = GetMyDesktop(); activeDesktop = GetInputDesktop(); - LogDebug("*** Active Desktop = " + activeDesktop); - LogDebug("*** My Desktop = " + myDesktop); + Logger.LogDebug("*** Active Desktop = " + activeDesktop); + Logger.LogDebug("*** My Desktop = " + myDesktop); if (myDesktop.Equals(activeDesktop, StringComparison.OrdinalIgnoreCase)) { - LogDebug("*** Active Desktop == My Desktop (TS session)"); + Logger.LogDebug("*** Active Desktop == My Desktop (TS session)"); } if (!activeDesktop.Equals("winlogon", StringComparison.OrdinalIgnoreCase) && @@ -307,25 +308,25 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log($"{nameof(CheckForDesktopSwitchEvent)}: {e}"); + Logger.Log($"{nameof(CheckForDesktopSwitchEvent)}: {e}"); } } else { if (!myDesktop.Equals(activeDesktop, StringComparison.OrdinalIgnoreCase)) { - Log("*** Active Desktop <> My Desktop"); + Logger.Log("*** Active Desktop <> My Desktop"); } uint sid = NativeMethods.WTSGetActiveConsoleSessionId(); if (Process.GetProcessesByName(Common.BinaryName).Any(p => (uint)p.SessionId == sid)) { - Log("Found MouseWithoutBorders on the active session!"); + Logger.Log("Found MouseWithoutBorders on the active session!"); } else { - Log("MouseWithoutBorders not found on the active session!"); + Logger.Log("MouseWithoutBorders not found on the active session!"); StartMMService(null); } } @@ -333,7 +334,7 @@ namespace MouseWithoutBorders if (!myDesktop.Equals("winlogon", StringComparison.OrdinalIgnoreCase) && !myDesktop.Equals("default", StringComparison.OrdinalIgnoreCase)) { - LogDebug("*** Desktop inactive, exiting: " + myDesktop); + Logger.LogDebug("*** Desktop inactive, exiting: " + myDesktop); Setting.Values.LastX = JUST_GOT_BACK_FROM_SCREEN_SAVER; if (cleanupIfExit) { @@ -346,7 +347,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.cs b/src/modules/MouseWithoutBorders/App/Class/Common.cs index 325f84ca7d..1caeb47b2c 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.cs @@ -29,6 +29,7 @@ using Microsoft.PowerToys.Settings.UI.Library; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Exceptions; // Log is enough @@ -78,7 +79,7 @@ namespace MouseWithoutBorders { internal partial class Common { - private Common() + internal Common() { } @@ -259,7 +260,7 @@ namespace MouseWithoutBorders { if (SocketMutex != null) { - LogDebug("SOCKET MUTEX BEGIN RELEASE."); + Logger.LogDebug("SOCKET MUTEX BEGIN RELEASE."); try { @@ -269,14 +270,14 @@ namespace MouseWithoutBorders catch (ApplicationException e) { // The current thread does not own the mutex, the thread acquired it will own it. - TelemetryLogTrace($"{nameof(ReleaseSocketMutex)}: {e.Message}. {Thread.CurrentThread.ManagedThreadId}/{UIThreadID}.", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"{nameof(ReleaseSocketMutex)}: {e.Message}. {Thread.CurrentThread.ManagedThreadId}/{UIThreadID}.", SeverityLevel.Warning); } - LogDebug("SOCKET MUTEX RELEASED."); + Logger.LogDebug("SOCKET MUTEX RELEASED."); } else { - LogDebug("SOCKET MUTEX NULL."); + Logger.LogDebug("SOCKET MUTEX NULL."); } } @@ -284,7 +285,7 @@ namespace MouseWithoutBorders { if (SocketMutex != null) { - LogDebug("SOCKET MUTEX BEGIN WAIT."); + Logger.LogDebug("SOCKET MUTEX BEGIN WAIT."); int waitTimeout = 60000; // TcpListener.Stop may take very long to complete for some reason. int socketMutexBalance = int.MinValue; @@ -302,14 +303,14 @@ namespace MouseWithoutBorders if (!acquireMutex) { Process[] ps = Process.GetProcessesByName(Common.BinaryName); - TelemetryLogTrace($"Balance: {socketMutexBalance}, Active: {IsMyDesktopActive()}, Sid/Console: {Process.GetCurrentProcess().SessionId}/{NativeMethods.WTSGetActiveConsoleSessionId()}, Desktop/Input: {GetMyDesktop()}/{GetInputDesktop()}, count: {ps?.Length}.", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"Balance: {socketMutexBalance}, Active: {IsMyDesktopActive()}, Sid/Console: {Process.GetCurrentProcess().SessionId}/{NativeMethods.WTSGetActiveConsoleSessionId()}, Desktop/Input: {GetMyDesktop()}/{GetInputDesktop()}, count: {ps?.Length}.", SeverityLevel.Warning); } - LogDebug("SOCKET MUTEX ENDED."); + Logger.LogDebug("SOCKET MUTEX ENDED."); } else { - LogDebug("SOCKET MUTEX NULL."); + Logger.LogDebug("SOCKET MUTEX NULL."); } } @@ -318,7 +319,7 @@ namespace MouseWithoutBorders internal static bool ExecuteAndTrace(string actionName, Action action, TimeSpan timeout, bool restart = false) { bool rv = true; - LogDebug(actionName); + Logger.LogDebug(actionName); bool done = false; BlockingUI = true; @@ -343,12 +344,12 @@ namespace MouseWithoutBorders } } - TelemetryLogTrace($"[{actionName}] took more than {(long)timeout.TotalSeconds}, restarting the process.", SeverityLevel.Warning, true); + Logger.TelemetryLogTrace($"[{actionName}] took more than {(long)timeout.TotalSeconds}, restarting the process.", SeverityLevel.Warning, true); string desktop = Common.GetMyDesktop(); oneInstanceCheck?.Close(); _ = Process.Start(Application.ExecutablePath, desktop); - LogDebug($"Started on desktop {desktop}"); + Logger.LogDebug($"Started on desktop {desktop}"); Process.GetCurrentProcess().KillProcess(true); }, @@ -379,7 +380,7 @@ namespace MouseWithoutBorders if (!restart) { - TelemetryLogTrace($"[{actionName}] took more than {(long)timeout.TotalSeconds}: {(long)timer.Elapsed.TotalSeconds}.", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"[{actionName}] took more than {(long)timeout.TotalSeconds}: {(long)timer.Elapsed.TotalSeconds}.", SeverityLevel.Warning); } } } @@ -445,7 +446,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } finally { @@ -457,7 +458,7 @@ namespace MouseWithoutBorders catch (Exception e) { done = true; - Log(e); + Logger.Log(e); } while (blocking && !done) @@ -508,11 +509,11 @@ namespace MouseWithoutBorders internal static void SendNextMachine(ID hostMachine, ID nextMachine, Point requestedXY) { - LogDebug($"SendNextMachine: Host machine: {hostMachine}, Next machine: {nextMachine}, Requested XY: {requestedXY}"); + Logger.LogDebug($"SendNextMachine: Host machine: {hostMachine}, Next machine: {nextMachine}, Requested XY: {requestedXY}"); if (GetTick() - lastSendNextMachine < 100) { - LogDebug("Machine switching in progress."); // "Move Mouse relatively" mode, slow machine/network, quick/busy hand. + Logger.LogDebug("Machine switching in progress."); // "Move Mouse relatively" mode, slow machine/network, quick/busy hand. return; } @@ -529,7 +530,7 @@ namespace MouseWithoutBorders SkSend(package, null, false); - LogDebug("SendNextMachine done."); + Logger.LogDebug("SendNextMachine done."); } private static ulong lastInputEventCount; @@ -603,7 +604,7 @@ namespace MouseWithoutBorders private static void SendByeBye() { - LogDebug($"{nameof(SendByeBye)}"); + Logger.LogDebug($"{nameof(SendByeBye)}"); SendPackage(ID.ALL, PackageType.ByeBye); } @@ -629,7 +630,7 @@ namespace MouseWithoutBorders internal static void SetToggleIcon(int[] toggleIcons) { - Common.LogDebug($"{nameof(SetToggleIcon)}: {toggleIcons?.FirstOrDefault()}"); + Logger.LogDebug($"{nameof(SetToggleIcon)}: {toggleIcons?.FirstOrDefault()}"); Common.toggleIcons = toggleIcons; toggleIconsIndex = 0; } @@ -651,7 +652,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); return null; } } @@ -666,7 +667,7 @@ namespace MouseWithoutBorders InputSimulation.SendKey(new KEYBDDATA() { wVk = (int)VK.SNAPSHOT }); InputSimulation.SendKey(new KEYBDDATA() { dwFlags = (int)Common.LLKHF.UP, wVk = (int)VK.SNAPSHOT }); - Common.LogDebug("PrepareScreenCapture: SNAPSHOT simulated."); + Logger.LogDebug("PrepareScreenCapture: SNAPSHOT simulated."); _ = NativeMethods.MoveWindow( (IntPtr)NativeMethods.FindWindow(null, Common.HELPER_FORM_TEXT), @@ -680,7 +681,7 @@ namespace MouseWithoutBorders } else { - Common.Log("PrepareScreenCapture: Validation failed."); + Logger.Log("PrepareScreenCapture: Validation failed."); } }); } @@ -761,7 +762,7 @@ namespace MouseWithoutBorders } else { - Log(tip); + Logger.Log(tip); } } }); @@ -934,7 +935,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); t.BackingSocket = null; // To be removed at CloseAnUnusedSocket() updateClientSockets = true; } @@ -945,7 +946,7 @@ namespace MouseWithoutBorders if (!connected && data.Des != ID.ALL) { - LogDebug("********** No active connection found for the remote machine! **********" + data.Des.ToString()); + Logger.LogDebug("********** No active connection found for the remote machine! **********" + data.Des.ToString()); if (data.Des == ID.NONE || RemoveDeadMachines(data.Des)) { @@ -965,7 +966,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } #if DEBUG @@ -1006,7 +1007,7 @@ namespace MouseWithoutBorders { if ((t.Status != SocketStatus.Connected && t.BirthTime < GetTick() - SocketStuff.CONNECT_TIMEOUT) || t.BackingSocket == null) { - LogDebug("CloseAnUnusedSocket: " + t.MachineName + ":" + t.MachineId + "|" + t.Status.ToString()); + Logger.LogDebug("CloseAnUnusedSocket: " + t.MachineName + ":" + t.MachineId + "|" + t.Status.ToString()); tobeRemoved = t; if (t.BackingSocket != null) @@ -1017,7 +1018,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); } } @@ -1048,7 +1049,7 @@ namespace MouseWithoutBorders { if (t.Status == SocketStatus.Connected) { - LogDebug("AtLeastOneSocketConnected returning true: " + t.MachineName); + Logger.LogDebug("AtLeastOneSocketConnected returning true: " + t.MachineName); return true; } } @@ -1056,7 +1057,7 @@ namespace MouseWithoutBorders } } - LogDebug("AtLeastOneSocketConnected returning false."); + Logger.LogDebug("AtLeastOneSocketConnected returning false."); return false; } @@ -1074,7 +1075,7 @@ namespace MouseWithoutBorders { if (!t.IsClient && t.Status == SocketStatus.Connected) { - LogDebug("AtLeastOneServerSocketConnected returning true: " + t.MachineName); + Logger.LogDebug("AtLeastOneServerSocketConnected returning true: " + t.MachineName); return t.BackingSocket; } } @@ -1082,7 +1083,7 @@ namespace MouseWithoutBorders } } - LogDebug("AtLeastOneServerSocketConnected returning false."); + Logger.LogDebug("AtLeastOneServerSocketConnected returning false."); return null; } @@ -1119,7 +1120,7 @@ namespace MouseWithoutBorders { if (TestSend(t)) { - LogDebug($"{nameof(AtLeastOneSocketEstablished)} returning true: {t.MachineName}"); + Logger.LogDebug($"{nameof(AtLeastOneSocketEstablished)} returning true: {t.MachineName}"); return true; } } @@ -1128,7 +1129,7 @@ namespace MouseWithoutBorders } } - LogDebug($"{nameof(AtLeastOneSocketEstablished)} returning false."); + Logger.LogDebug($"{nameof(AtLeastOneSocketEstablished)} returning false."); return false; } @@ -1209,7 +1210,7 @@ namespace MouseWithoutBorders if (machineCt < 2 && Common.Settings != null && (Common.Settings.GetCurrentPage() is SetupPage1 || Common.Settings.GetCurrentPage() is SetupPage2b)) { Common.MachineMatrix = new string[Common.MAX_MACHINE] { Common.MachineName.Trim(), desMachine, string.Empty, string.Empty }; - Common.LogDebug("UpdateSetupMachineMatrix: " + string.Join(",", Common.MachineMatrix)); + Logger.LogDebug("UpdateSetupMachineMatrix: " + string.Join(",", Common.MachineMatrix)); Common.DoSomethingInUIThread( () => @@ -1240,7 +1241,7 @@ namespace MouseWithoutBorders catch (Exception e) { Sk = null; - Log(e); + Logger.Log(e); } if (Sk != null) @@ -1325,7 +1326,7 @@ namespace MouseWithoutBorders }); } - LogDebug("GetMyStorageDir: " + st); + Logger.LogDebug("GetMyStorageDir: " + st); // Delete old files. foreach (FileInfo fi in new DirectoryInfo(st).GetFiles()) @@ -1340,7 +1341,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Log(e); + Logger.Log(e); if (string.IsNullOrEmpty(st) || !st.Contains(Common.BinaryName)) { @@ -1358,11 +1359,11 @@ namespace MouseWithoutBorders try { machine_Name = Dns.GetHostName(); - LogDebug("GetHostName = " + machine_Name); + Logger.LogDebug("GetHostName = " + machine_Name); } catch (Exception e) { - Log(e); + Logger.Log(e); if (string.IsNullOrEmpty(machine_Name)) { @@ -1377,7 +1378,7 @@ namespace MouseWithoutBorders Common.MachineName = machine_Name.Trim(); - LogDebug($"========== {nameof(GetMachineName)} ended!"); + Logger.LogDebug($"========== {nameof(GetMachineName)} ended!"); } private static string GetNetworkName(NetworkInterface networkInterface) @@ -1405,7 +1406,7 @@ namespace MouseWithoutBorders } catch (ObjectDisposedException e) { - Log($"{nameof(GetRemoteStringIP)}: The socket could have been disposed by other threads, error: {e.Message}"); + Logger.Log($"{nameof(GetRemoteStringIP)}: The socket could have been disposed by other threads, error: {e.Message}"); if (throwException) { @@ -1416,7 +1417,7 @@ namespace MouseWithoutBorders } catch (SocketException e) { - Log($"{nameof(GetRemoteStringIP)}: {e.Message}"); + Logger.Log($"{nameof(GetRemoteStringIP)}: {e.Message}"); if (throwException) { @@ -1466,7 +1467,7 @@ namespace MouseWithoutBorders internal static void MoveMouseToCenter() { - LogDebug("+++++ MoveMouseToCenter"); + Logger.LogDebug("+++++ MoveMouseToCenter"); InputSimulation.MoveMouse( Common.PrimaryScreenBounds.Left + ((Common.PrimaryScreenBounds.Right - Common.PrimaryScreenBounds.Left) / 2), Common.PrimaryScreenBounds.Top + ((Common.PrimaryScreenBounds.Bottom - Common.PrimaryScreenBounds.Top) / 2)); @@ -1482,7 +1483,7 @@ namespace MouseWithoutBorders { _ = NativeMethods.SetCursorPos(Common.LastPos.X, Common.LastPos.Y); _ = NativeMethods.GetCursorPos(ref Common.lastPos); - LogDebug($"+++++ HideMouseCursor, byHideMouseMessage = {byHideMouseMessage}"); + Logger.LogDebug($"+++++ HideMouseCursor, byHideMouseMessage = {byHideMouseMessage}"); } CustomCursor.ShowFakeMouseCursor(int.MinValue, int.MinValue); @@ -1493,7 +1494,7 @@ namespace MouseWithoutBorders int length = NativeMethods.GetWindowTextLength(hWnd); StringBuilder sb = new(length + 1); int rv = NativeMethods.GetWindowText(hWnd, sb, sb.Capacity); - LogDebug("GetWindowText returned " + rv.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("GetWindowText returned " + rv.ToString(CultureInfo.CurrentCulture)); return sb.ToString(); } @@ -1536,14 +1537,14 @@ namespace MouseWithoutBorders if (read != toRead) { - Common.LogDebug("Stream has no more data after reading {0} bytes.", read); + Logger.LogDebug("Stream has no more data after reading {0} bytes.", read); } } } catch (IOException e) { string log = $"{nameof(SendOrReceiveARandomDataBlockPerInitialIV)}: Exception {(send ? "writing" : "reading")} to the socket stream: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); if (e.InnerException is not (SocketException or ObjectDisposedException)) { diff --git a/src/modules/MouseWithoutBorders/App/Class/CustomCursor.cs b/src/modules/MouseWithoutBorders/App/Class/CustomCursor.cs index d1e56f7f8a..dc90471d4c 100644 --- a/src/modules/MouseWithoutBorders/App/Class/CustomCursor.cs +++ b/src/modules/MouseWithoutBorders/App/Class/CustomCursor.cs @@ -16,6 +16,8 @@ using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Windows.Forms; +using MouseWithoutBorders.Core; + // Disable the warning to preserve original code #pragma warning disable CA1716 namespace MouseWithoutBorders.Class @@ -107,12 +109,12 @@ namespace MouseWithoutBorders.Class } catch (NullReferenceException) { - Common.Log($"{nameof(Common.MouseCursorForm)} has been set to null by another thread."); + Logger.Log($"{nameof(Common.MouseCursorForm)} has been set to null by another thread."); Common.MouseCursorForm = new FrmMouseCursor(); } catch (ObjectDisposedException) { - Common.Log($"{nameof(Common.MouseCursorForm)} has been disposed."); + Logger.Log($"{nameof(Common.MouseCursorForm)} has been disposed."); Common.MouseCursorForm = new FrmMouseCursor(); } }, @@ -134,11 +136,11 @@ namespace MouseWithoutBorders.Class } catch (NullReferenceException) { - Common.Log($"{nameof(Common.MouseCursorForm)} has already been set to null by another thread!"); + Logger.Log($"{nameof(Common.MouseCursorForm)} has already been set to null by another thread!"); } catch (ObjectDisposedException) { - Common.Log($"{nameof(Common.MouseCursorForm)} has already been disposed!"); + Logger.Log($"{nameof(Common.MouseCursorForm)} has already been disposed!"); } Common.MouseCursorForm = null; diff --git a/src/modules/MouseWithoutBorders/App/Class/Extensions.cs b/src/modules/MouseWithoutBorders/App/Class/Extensions.cs index 904a14a3a5..0103c3e4e3 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Extensions.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Extensions.cs @@ -6,6 +6,8 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; +using MouseWithoutBorders.Core; + // Disable the warning to preserve original code #pragma warning disable CA1716 namespace MouseWithoutBorders.Class @@ -42,7 +44,7 @@ namespace MouseWithoutBorders.Class catch (Win32Exception e) { string log = $"The process {processName} (PID={processId}) could not be terminated, error: {e.Message}"; - Common.TelemetryLogTrace(log, SeverityLevel.Error); + Logger.TelemetryLogTrace(log, SeverityLevel.Error); Common.ShowToolTip(log, 5000); if (!keepTrying) diff --git a/src/modules/MouseWithoutBorders/App/Class/IClipboardHelper.cs b/src/modules/MouseWithoutBorders/App/Class/IClipboardHelper.cs index c88ac5a6da..ecaeef77db 100644 --- a/src/modules/MouseWithoutBorders/App/Class/IClipboardHelper.cs +++ b/src/modules/MouseWithoutBorders/App/Class/IClipboardHelper.cs @@ -23,8 +23,9 @@ using StreamJsonRpc; #if !MM_HELPER using MouseWithoutBorders.Class; - +using MouseWithoutBorders.Core; #endif + using SystemClipboard = System.Windows.Forms.Clipboard; namespace MouseWithoutBorders @@ -127,7 +128,7 @@ namespace MouseWithoutBorders { public void SendLog(string log) { - Common.LogDebug("FROM HELPER: " + log); + Logger.LogDebug("FROM HELPER: " + log); if (!string.IsNullOrEmpty(log)) { @@ -143,7 +144,7 @@ namespace MouseWithoutBorders } else if (log.StartsWith("Trace:", StringComparison.InvariantCulture)) { - Common.TelemetryLogTrace(log, SeverityLevel.Information); + Logger.TelemetryLogTrace(log, SeverityLevel.Information); } } } @@ -197,7 +198,7 @@ WellKnownSidType.AuthenticatedUserSid, null); #if MM_HELPER _ = e; #else - Common.Log(e); + Logger.Log(e); #endif } }, @@ -247,7 +248,7 @@ WellKnownSidType.AuthenticatedUserSid, null); { Common.IpcChannelCreated = false; Common.ShowToolTip("Error setting up clipboard sharing, clipboard sharing will not work!", 5000, ToolTipIcon.Error); - Common.Log(e); + Logger.Log(e); } } #else @@ -263,7 +264,7 @@ WellKnownSidType.AuthenticatedUserSid, null); } catch (Exception e) { - Logger.LogEvent(e.Message, EventLogEntryType.Error); + EventLogger.LogEvent(e.Message, EventLogEntryType.Error); } return null; @@ -272,7 +273,7 @@ WellKnownSidType.AuthenticatedUserSid, null); } - internal static class Logger + internal static class EventLogger { #if MM_HELPER private const string EventSourceName = "MouseWithoutBordersHelper"; diff --git a/src/modules/MouseWithoutBorders/App/Class/InputHook.cs b/src/modules/MouseWithoutBorders/App/Class/InputHook.cs index 88306a4720..59b5974a80 100644 --- a/src/modules/MouseWithoutBorders/App/Class/InputHook.cs +++ b/src/modules/MouseWithoutBorders/App/Class/InputHook.cs @@ -19,6 +19,7 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using Microsoft.PowerToys.Settings.UI.Library; +using MouseWithoutBorders.Core; [module: SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "MouseWithoutBorders.InputHook.#MouseHookProc(System.Int32,System.Int32,System.IntPtr)", Justification = "Dotnet port with style preservation")] [module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "MouseWithoutBorders.InputHook.#ProcessKeyEx(System.Int32,System.Int32)", Justification = "Dotnet port with style preservation")] @@ -117,7 +118,7 @@ namespace MouseWithoutBorders.Class if (hMouseHook == 0) { le = Marshal.GetLastWin32Error(); - Common.Log("Error installing Mouse hook: " + le.ToString(CultureInfo.CurrentCulture)); + Logger.Log("Error installing Mouse hook: " + le.ToString(CultureInfo.CurrentCulture)); er = true; Stop(); } @@ -133,7 +134,7 @@ namespace MouseWithoutBorders.Class if (hKeyboardHook == 0) { le = Marshal.GetLastWin32Error(); - Common.Log("Error installing keyboard hook: " + le.ToString(CultureInfo.CurrentCulture)); + Logger.Log("Error installing keyboard hook: " + le.ToString(CultureInfo.CurrentCulture)); er = true; Stop(); } @@ -166,7 +167,7 @@ namespace MouseWithoutBorders.Class int errorCode = Marshal.GetLastWin32Error(); // throw new Win32Exception(errorCode); - Common.Log("Exception uninstalling Mouse hook, error code: " + errorCode.ToString(CultureInfo.CurrentCulture)); + Logger.Log("Exception uninstalling Mouse hook, error code: " + errorCode.ToString(CultureInfo.CurrentCulture)); } } @@ -179,7 +180,7 @@ namespace MouseWithoutBorders.Class int errorCode = Marshal.GetLastWin32Error(); // throw new Win32Exception(errorCode); - Common.Log("Exception uninstalling keyboard hook, error code: " + errorCode.ToString(CultureInfo.CurrentCulture)); + Logger.Log("Exception uninstalling keyboard hook, error code: " + errorCode.ToString(CultureInfo.CurrentCulture)); } } } @@ -234,7 +235,7 @@ namespace MouseWithoutBorders.Class { if (wParam == Common.WM_LBUTTONUP && SkipMouseUpCount > 0) { - Common.LogDebug($"{nameof(SkipMouseUpCount)}: {SkipMouseUpCount}."); + Logger.LogDebug($"{nameof(SkipMouseUpCount)}: {SkipMouseUpCount}."); SkipMouseUpCount--; rv = NativeMethods.CallNextHookEx(hMouseHook, nCode, wParam, lParam); return rv; @@ -326,7 +327,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); rv = NativeMethods.CallNextHookEx(hMouseHook, nCode, wParam, lParam); } @@ -455,7 +456,7 @@ namespace MouseWithoutBorders.Class break; default: - Common.LogDebug("X"); + Logger.LogDebug("X"); return ProcessHotKeys(vkCode, hookCallbackKeybdData); } } diff --git a/src/modules/MouseWithoutBorders/App/Class/InputSimulation.cs b/src/modules/MouseWithoutBorders/App/Class/InputSimulation.cs index 5ff39f8adc..bca6e4b28f 100644 --- a/src/modules/MouseWithoutBorders/App/Class/InputSimulation.cs +++ b/src/modules/MouseWithoutBorders/App/Class/InputSimulation.cs @@ -17,6 +17,7 @@ using System.ServiceProcess; using System.Threading.Tasks; using Microsoft.PowerToys.Settings.UI.Library; +using MouseWithoutBorders.Core; using Windows.UI.Input.Preview.Injection; using static MouseWithoutBorders.Class.NativeMethods; @@ -152,7 +153,7 @@ namespace MouseWithoutBorders.Class } log += "*"; // ((Keys)kd.wVk).ToString(CultureInfo.InvariantCulture); - Common.LogDebug(log); + Logger.LogDebug(log); } // Md.X, Md.Y is from 0 to 65535 @@ -174,7 +175,7 @@ namespace MouseWithoutBorders.Class if (md.dwFlags != Common.WM_MOUSEMOVE) { - Common.LogDebug($"InputSimulation.SendMouse: x = {md.X}, y = {md.Y}, WheelDelta = {md.WheelDelta}, dwFlags = {md.dwFlags}."); + Logger.LogDebug($"InputSimulation.SendMouse: x = {md.X}, y = {md.Y}, WheelDelta = {md.WheelDelta}, dwFlags = {md.dwFlags}."); } switch (md.dwFlags) @@ -242,7 +243,7 @@ namespace MouseWithoutBorders.Class mouse_input.mi.dx = (int)dx; mouse_input.mi.dy = (int)dy; - Common.LogDebug($"InputSimulation.MoveMouseEx: x = {x}, y = {y}."); + Logger.LogDebug($"InputSimulation.MoveMouseEx: x = {x}, y = {y}."); mouse_input.mi.dwFlags |= (int)(NativeMethods.MOUSEEVENTF.MOVE | NativeMethods.MOUSEEVENTF.ABSOLUTE); @@ -264,7 +265,7 @@ namespace MouseWithoutBorders.Class mouse_input.mi.mouseData = 0; mouse_input.mi.dwFlags = (int)(NativeMethods.MOUSEEVENTF.MOVE | NativeMethods.MOUSEEVENTF.ABSOLUTE); - Common.LogDebug($"InputSimulation.MoveMouse: x = {x}, y = {y}."); + Logger.LogDebug($"InputSimulation.MoveMouse: x = {x}, y = {y}."); Common.DoSomethingInTheInputSimulationThread(() => { @@ -285,7 +286,7 @@ namespace MouseWithoutBorders.Class mouse_input.mi.mouseData = 0; mouse_input.mi.dwFlags = (int)NativeMethods.MOUSEEVENTF.MOVE; - Common.LogDebug($"InputSimulation.MoveMouseRelative: x = {dx}, y = {dy}."); + Logger.LogDebug($"InputSimulation.MoveMouseRelative: x = {dx}, y = {dy}."); Common.DoSomethingInTheInputSimulationThread(() => { @@ -309,7 +310,7 @@ namespace MouseWithoutBorders.Class InputHook.SkipMouseUpCount++; _ = SendInputEx(input); - Common.LogDebug("MouseUp() called"); + Logger.LogDebug("MouseUp() called"); }); } @@ -338,7 +339,7 @@ namespace MouseWithoutBorders.Class input.mi.dwFlags = (int)NativeMethods.MOUSEEVENTF.LEFTUP; _ = SendInputEx(input); - Common.LogDebug("MouseClick() called"); + Logger.LogDebug("MouseClick() called"); Thread.Sleep(200); } finally @@ -450,7 +451,7 @@ namespace MouseWithoutBorders.Class eatKey = true; Common.ReleaseAllKeys(); uint rv = NativeMethods.LockWorkStation(); - Common.LogDebug("LockWorkStation returned " + rv.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("LockWorkStation returned " + rv.ToString(CultureInfo.CurrentCulture)); } break; diff --git a/src/modules/MouseWithoutBorders/App/Class/Program.cs b/src/modules/MouseWithoutBorders/App/Class/Program.cs index 025c6b9b88..91ed60874f 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Program.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Program.cs @@ -34,6 +34,8 @@ using Microsoft.PowerToys.Telemetry; using Newtonsoft.Json; using StreamJsonRpc; +using Logger = MouseWithoutBorders.Core.Logger; + [module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "MouseWithoutBorders", Justification = "Dotnet port with style preservation")] [module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant", Justification = "Dotnet port with style preservation")] [module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", Scope = "member", Target = "MouseWithoutBorders.Program.#Main()", MessageId = "System.String.ToLower", Justification = "Dotnet port with style preservation")] @@ -53,11 +55,11 @@ namespace MouseWithoutBorders.Class private static void Main() { ManagedCommon.Logger.InitializeLogger("\\MouseWithoutBorders\\Logs"); - Common.Log(Application.ProductName + " Started!"); + Logger.Log(Application.ProductName + " Started!"); if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredMouseWithoutBordersEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled) { - Common.Log("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); + Logger.Log("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); return; } @@ -81,9 +83,9 @@ namespace MouseWithoutBorders.Class } User = WindowsIdentity.GetCurrent().Name; - Common.LogDebug("*** Started as " + User); + Logger.LogDebug("*** Started as " + User); - Common.Log(Environment.CommandLine); + Logger.Log(Environment.CommandLine); bool serviceMode = firstArg == ServiceModeArg; @@ -99,8 +101,8 @@ namespace MouseWithoutBorders.Class } catch (Exception ex) { - Common.Log("Couldn't start the service. Will try to continue as not a service."); - Common.Log(ex); + Logger.Log("Couldn't start the service. Will try to continue as not a service."); + Logger.Log(ex); ShowServiceModeErrorTooltip = true; serviceMode = false; Setting.Values.UseService = false; @@ -121,7 +123,7 @@ namespace MouseWithoutBorders.Class { if (Common.CheckSecondInstance(Common.RunWithNoAdminRight)) { - Common.Log("*** Second instance, exiting..."); + Logger.Log("*** Second instance, exiting..."); return; } @@ -130,16 +132,16 @@ namespace MouseWithoutBorders.Class if (firstArg.Equals("winlogon", StringComparison.OrdinalIgnoreCase)) { // Executed by service, running on logon desktop - Common.Log("*** Running on " + firstArg + " desktop"); + Logger.Log("*** Running on " + firstArg + " desktop"); Common.RunOnLogonDesktop = true; } else if (args[1].Trim().Equals("default", StringComparison.OrdinalIgnoreCase)) { - Common.Log("*** Running on " + firstArg + " desktop"); + Logger.Log("*** Running on " + firstArg + " desktop"); } else if (args[1].Equals(myDesktop, StringComparison.OrdinalIgnoreCase)) { - Common.Log("*** Running on " + myDesktop); + Logger.Log("*** Running on " + myDesktop); if (myDesktop.Equals("Screen-saver", StringComparison.OrdinalIgnoreCase)) { Common.RunOnScrSaverDesktop = true; @@ -151,7 +153,7 @@ namespace MouseWithoutBorders.Class { if (Common.CheckSecondInstance(true)) { - Common.Log("*** Second instance, exiting..."); + Logger.Log("*** Second instance, exiting..."); return; } } @@ -165,10 +167,10 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } - Common.Log(Environment.OSVersion.ToString()); + Logger.Log(Environment.OSVersion.ToString()); // Environment.OSVersion is unreliable from 6.2 and up, so just forcefully call the APIs and log the exception unsupported by Windows: int setProcessDpiAwarenessResult = -1; @@ -176,31 +178,31 @@ namespace MouseWithoutBorders.Class try { setProcessDpiAwarenessResult = NativeMethods.SetProcessDpiAwareness(2); - Common.Log(string.Format(CultureInfo.InvariantCulture, "SetProcessDpiAwareness: {0}.", setProcessDpiAwarenessResult)); + Logger.Log(string.Format(CultureInfo.InvariantCulture, "SetProcessDpiAwareness: {0}.", setProcessDpiAwarenessResult)); } catch (DllNotFoundException) { - Common.Log("SetProcessDpiAwareness is unsupported in Windows 7 and lower."); + Logger.Log("SetProcessDpiAwareness is unsupported in Windows 7 and lower."); } catch (EntryPointNotFoundException) { - Common.Log("SetProcessDpiAwareness is unsupported in Windows 7 and lower."); + Logger.Log("SetProcessDpiAwareness is unsupported in Windows 7 and lower."); } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } try { if (setProcessDpiAwarenessResult != 0) { - Common.Log(string.Format(CultureInfo.InvariantCulture, "SetProcessDPIAware: {0}.", NativeMethods.SetProcessDPIAware())); + Logger.Log(string.Format(CultureInfo.InvariantCulture, "SetProcessDPIAware: {0}.", NativeMethods.SetProcessDPIAware())); } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } System.Threading.Thread mainUIThread = Thread.CurrentThread; @@ -226,7 +228,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -397,14 +399,14 @@ namespace MouseWithoutBorders.Class { if (pp.Id != me.Id) { - Common.Log(string.Format(CultureInfo.InvariantCulture, "Killing process {0}.", pp.Id)); + Logger.Log(string.Format(CultureInfo.InvariantCulture, "Killing process {0}.", pp.Id)); pp.KillProcess(); } } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } Common.StartMouseWithoutBordersService(); diff --git a/src/modules/MouseWithoutBorders/App/Class/Setting.cs b/src/modules/MouseWithoutBorders/App/Class/Setting.cs index 6ce32bbc2f..a2eb300b0c 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Setting.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Setting.cs @@ -29,6 +29,7 @@ using Microsoft.PowerToys.Settings.UI.Library.Utilities; // 2023- Included in PowerToys. // using Microsoft.Win32; +using MouseWithoutBorders.Core; using Settings.UI.Library.Attributes; [module: SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "MouseWithoutBorders.Properties.Setting.Values.#LoadIntSetting(System.String,System.Int32)", Justification = "Dotnet port with style preservation")] @@ -133,7 +134,7 @@ namespace MouseWithoutBorders.Class } catch (IOException ex) { - Logger.LogEvent($"Failed to read settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); + EventLogger.LogEvent($"Failed to read settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); } PauseInstantSaving = false; @@ -168,7 +169,7 @@ namespace MouseWithoutBorders.Class } catch (IOException ex) { - Logger.LogEvent($"Failed to write settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); + EventLogger.LogEvent($"Failed to write settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); } if (saved) @@ -198,7 +199,7 @@ namespace MouseWithoutBorders.Class } catch (Exception ex) { - Logger.LogEvent($"Failed to update settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); + EventLogger.LogEvent($"Failed to update settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error); } }); @@ -442,7 +443,7 @@ namespace MouseWithoutBorders.Class { if (_properties.SecurityKey.Value.Length != 0) { - Common.LogDebug("GETSECKEY: Key was already loaded/set: " + _properties.SecurityKey.Value); + Logger.LogDebug("GETSECKEY: Key was already loaded/set: " + _properties.SecurityKey.Value); return _properties.SecurityKey.Value; } else diff --git a/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs b/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs index 57600cde95..a6cf02e348 100644 --- a/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs +++ b/src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs @@ -17,6 +17,7 @@ using System.Security.Cryptography; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using MouseWithoutBorders.Core; // // Socket code. @@ -174,12 +175,12 @@ namespace MouseWithoutBorders.Class internal SocketStuff(int port, bool byUser) { - Common.LogDebug("SocketStuff started."); + Logger.LogDebug("SocketStuff started."); bASE_PORT = port; Common.Ran = new Random(); - Common.LogDebug("Validating session..."); + Logger.LogDebug("Validating session..."); if (Common.CurrentProcess.SessionId != NativeMethods.WTSGetActiveConsoleSessionId()) { @@ -198,12 +199,12 @@ namespace MouseWithoutBorders.Class } Common.MMSleep(1); - Common.Log("Not physical console session."); + Logger.Log("Not physical console session."); throw new NotPhysicalConsoleException("Not physical console session."); } - Common.LogDebug("Creating socket list and mutex..."); + Logger.LogDebug("Creating socket list and mutex..."); try { @@ -235,7 +236,7 @@ namespace MouseWithoutBorders.Class } catch (AbandonedMutexException e) { - Common.TelemetryLogTrace($"{nameof(SocketStuff)}: {e.Message}", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"{nameof(SocketStuff)}: {e.Message}", SeverityLevel.Warning); } Common.GetScreenConfig(); @@ -280,7 +281,7 @@ namespace MouseWithoutBorders.Class Common.GetMachineName(); // IPs might have been changed Common.UpdateMachineTimeAndID(); - Common.LogDebug("Creating sockets..."); + Logger.LogDebug("Creating sockets..."); openSocketErr = CreateSocket(); @@ -303,7 +304,7 @@ namespace MouseWithoutBorders.Class // It is reasonable to give a try on restarting MwB processes in other sessions. if (restartCount++ < 5 && Common.IsMyDesktopActive() && !Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop) { - Common.TelemetryLogTrace("Restarting the service dues to WSAEADDRINUSE.", SeverityLevel.Warning); + Logger.TelemetryLogTrace("Restarting the service dues to WSAEADDRINUSE.", SeverityLevel.Warning); Program.StartService(); Common.PleaseReopenSocket = Common.REOPEN_WHEN_WSAECONNRESET; } @@ -367,11 +368,11 @@ namespace MouseWithoutBorders.Class "Closing sockets", () => { - Common.LogDebug($"Closing socket [{skMessageServer?.Name}]."); + Logger.LogDebug($"Closing socket [{skMessageServer?.Name}]."); skMessageServer?.Close(); // The original ones, not the socket instances produced by the accept() method. skMessageServer = null; - Common.LogDebug($"Closing socket [{skClipboardServer?.Name}]."); + Logger.LogDebug($"Closing socket [{skClipboardServer?.Name}]."); skClipboardServer?.Close(); skClipboardServer = null; try @@ -383,7 +384,7 @@ namespace MouseWithoutBorders.Class if (TcpSockets != null) { - Common.LogDebug("********** Closing Sockets: " + TcpSockets.Count.ToString(CultureInfo.InvariantCulture)); + Logger.LogDebug("********** Closing Sockets: " + TcpSockets.Count.ToString(CultureInfo.InvariantCulture)); List notClosedSockets = new(); @@ -412,16 +413,16 @@ namespace MouseWithoutBorders.Class catch (SocketException e) { string log = $"Socket.Close error: {e.GetType()}/{e.Message}. This is expected when the socket is already closed by remote host."; - Common.Log(log); + Logger.Log(log); } catch (ObjectDisposedException e) { string log = $"Socket.Close error: {e.GetType()}/{e.Message}. This is expected when the socket is already disposed."; - Common.Log(log); + Logger.Log(log); } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } // If there was an error closing the socket: @@ -435,12 +436,12 @@ namespace MouseWithoutBorders.Class TcpSockets = notClosedSockets; } - Common.LogDebug("********** Sockets Closed: " + c.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("********** Sockets Closed: " + c.ToString(CultureInfo.CurrentCulture)); } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } }, TimeSpan.FromSeconds(3), @@ -448,7 +449,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } finally { @@ -463,7 +464,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } } @@ -477,16 +478,16 @@ namespace MouseWithoutBorders.Class } catch (SocketException e) { - Common.Log(e); + Logger.Log(e); return e; } catch (Exception e) { - Common.Log(e); + Logger.Log(e); return e; } - Common.LogDebug("=================================================="); + Logger.LogDebug("=================================================="); return null; } @@ -497,7 +498,7 @@ namespace MouseWithoutBorders.Class if (tcp.BackingSocket == null || !tcp.BackingSocket.Connected || encryptedStream == null) { string log = $"{nameof(TcpSendData)}: The socket is no longer connected, it could have been closed by the remote host."; - Common.Log(log); + Logger.Log(log); throw new ExpectedSocketException(log); } @@ -516,7 +517,7 @@ namespace MouseWithoutBorders.Class catch (IOException e) { string log = $"{nameof(TcpSendData)}: Exception writing to the socket: {tcp.MachineName}: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); throw e.InnerException is SocketException se ? new ExpectedSocketException(se) : new ExpectedSocketException(log); } @@ -533,7 +534,7 @@ namespace MouseWithoutBorders.Class if (magic != (Common.MagicNumber & 0xFFFF0000)) { - Common.Log("Magic number invalid!"); + Logger.Log("Magic number invalid!"); buf[0] = (byte)PackageType.Invalid; } @@ -544,7 +545,7 @@ namespace MouseWithoutBorders.Class if (buf[1] != checksum) { - Common.Log("Checksum invalid!"); + Logger.Log("Checksum invalid!"); buf[0] = (byte)PackageType.Invalid; } @@ -559,7 +560,7 @@ namespace MouseWithoutBorders.Class if (tcp.BackingSocket == null || !tcp.BackingSocket.Connected || decryptedStream == null) { string log = $"{nameof(TcpReceiveData)}: The socket is no longer connected, it could have been closed by the remote host."; - Common.Log(log); + Logger.Log(log); throw new ExpectedSocketException(log); } @@ -597,7 +598,7 @@ namespace MouseWithoutBorders.Class catch (IOException e) { string log = $"{nameof(TcpReceiveData)}: Exception reading from the socket: {tcp.MachineName}: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); throw e.InnerException is SocketException se ? new ExpectedSocketException(se) : new ExpectedSocketException(log); } @@ -668,7 +669,7 @@ namespace MouseWithoutBorders.Class int rv = TcpSendData(tcp, dataAsBytes); if (rv < dataAsBytes.Length) { - Common.Log("TcpSend error! Length of sent data is unexpected."); + Logger.Log("TcpSend error! Length of sent data is unexpected."); UpdateTcpSockets(tcp, SocketStatus.SendError); throw new SocketException((int)SocketStatus.SendError); } @@ -683,7 +684,7 @@ namespace MouseWithoutBorders.Class TcpListener server = param as TcpListener; do { - Common.LogDebug("TCPServerThread: Waiting for request..."); + Logger.LogDebug("TCPServerThread: Waiting for request..."); Socket s = server.AcceptSocket(); _ = Task.Run(() => @@ -694,7 +695,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } }); } @@ -703,22 +704,22 @@ namespace MouseWithoutBorders.Class catch (InvalidOperationException e) { string log = $"TCPServerThread.AcceptSocket: The server socket could have been closed. {e.Message}"; - Common.Log(log); + Logger.Log(log); } catch (SocketException e) { if (e.ErrorCode == (int)SocketError.Interrupted) { - Common.Log("TCPServerThread.AcceptSocket: A blocking socket call was canceled."); + Logger.Log("TCPServerThread.AcceptSocket: A blocking socket call was canceled."); } else { - Common.Log(e); + Logger.Log(e); } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -734,7 +735,7 @@ namespace MouseWithoutBorders.Class } catch (SocketException e) { - Common.Log($"{nameof(GetMachineNameFromSocket)}: {e.Message}"); + Logger.Log($"{nameof(GetMachineNameFromSocket)}: {e.Message}"); return stringIP; } @@ -745,7 +746,7 @@ namespace MouseWithoutBorders.Class if (dotPos > 0) { - Common.LogDebug("Removing domain part from the full machine name: {0}.", name); + Logger.LogDebug("Removing domain part from the full machine name: {0}.", name); name = name[..dotPos]; } } @@ -756,7 +757,7 @@ namespace MouseWithoutBorders.Class private void AddSocket(Socket s) { string machineName = GetMachineNameFromSocket(s); - Common.Log($"New connection from client: [{machineName}]."); + Logger.Log($"New connection from client: [{machineName}]."); TcpSk tcp = AddTcpSocket(false, s, SocketStatus.Connecting, machineName); StartNewTcpServer(tcp, machineName); } @@ -772,7 +773,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -789,13 +790,13 @@ namespace MouseWithoutBorders.Class return; } - Common.LogDebug("!!!!! UpdateTCPClients !!!!!"); + Logger.LogDebug("!!!!! UpdateTCPClients !!!!!"); try { if (Common.MachineMatrix != null) { - Common.LogDebug("MachineMatrix = " + string.Join(", ", Common.MachineMatrix)); + Logger.LogDebug("MachineMatrix = " + string.Join(", ", Common.MachineMatrix)); foreach (string st in Common.MachineMatrix) { @@ -809,7 +810,7 @@ namespace MouseWithoutBorders.Class if (found) { - Common.LogDebug(machineName + " is already connected! ^^^^^^^^^^^^^^^^^^^^^"); + Logger.LogDebug(machineName + " is already connected! ^^^^^^^^^^^^^^^^^^^^^"); continue; } @@ -820,7 +821,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -883,7 +884,7 @@ namespace MouseWithoutBorders.Class Socket dummySocket = new(AddressFamily.Unspecified, SocketType.Stream, ProtocolType.Tcp); TcpSk dummyTcp = AddTcpSocket(true, dummySocket, SocketStatus.Resolving, machineName); - Common.LogDebug("Connecting to: " + machineName); + Logger.LogDebug("Connecting to: " + machineName); if (!string.IsNullOrEmpty(Setting.Values.Name2IP)) { @@ -911,7 +912,7 @@ namespace MouseWithoutBorders.Class { useName2IP = true; - Common.LogDebug("Using both user-defined Name-to-IP mappings and DNS result for " + machineName); + Logger.LogDebug("Using both user-defined Name-to-IP mappings and DNS result for " + machineName); Common.ShowToolTip("Using both user-defined Name-to-IP mappings and DNS result for " + machineName, 3000, ToolTipIcon.Info, false); @@ -941,7 +942,7 @@ namespace MouseWithoutBorders.Class Common.ShowToolTip(e.Message + ": " + machineName, 10000, ToolTipIcon.Warning, Setting.Values.ShowClipNetStatus); - Common.Log($"{nameof(StartNewTcpClient)}.{nameof(Dns.GetHostEntry)}: {e.Message}"); + Logger.Log($"{nameof(StartNewTcpClient)}.{nameof(Dns.GetHostEntry)}: {e.Message}"); } UpdateTcpSockets(dummyTcp, SocketStatus.NA); @@ -967,7 +968,7 @@ namespace MouseWithoutBorders.Class } } - Common.LogDebug(machineName + ipLog); + Logger.LogDebug(machineName + ipLog); } if (validAddresses.Count > 0) @@ -983,7 +984,7 @@ namespace MouseWithoutBorders.Class { if (IsBadIP(machineName, ip)) { - Common.Log($"Skip bad IP address: {ip}"); + Logger.Log($"Skip bad IP address: {ip}"); continue; } @@ -998,18 +999,18 @@ namespace MouseWithoutBorders.Class } else { - Common.Log($"DNS information of machine not matched: {machineName} => {ip} => {hn}."); + Logger.Log($"DNS information of machine not matched: {machineName} => {ip} => {hn}."); AddBadIP(machineName, ip); } } catch (SocketException se) { - Common.Log($"{nameof(StartNewTcpClient)}: DNS information of machine not matched: {machineName} => {ip} => {se.Message}."); + Logger.Log($"{nameof(StartNewTcpClient)}: DNS information of machine not matched: {machineName} => {ip} => {se.Message}."); AddBadIP(machineName, ip); } catch (ArgumentException ae) { - Common.Log($"{nameof(StartNewTcpClient)}: DNS information of machine not matched: {machineName} => {ip} => {ae.Message}."); + Logger.Log($"{nameof(StartNewTcpClient)}: DNS information of machine not matched: {machineName} => {ip} => {ae.Message}."); AddBadIP(machineName, ip); } } @@ -1030,7 +1031,7 @@ namespace MouseWithoutBorders.Class } else { - Common.Log("Cannot resolve IPv4 Addresses of machine: " + machineName); + Logger.Log("Cannot resolve IPv4 Addresses of machine: " + machineName); if (!useName2IP) { @@ -1058,7 +1059,7 @@ namespace MouseWithoutBorders.Class if (!remoteIPv4Addresses.Any()) { - Common.Log($"No IPv4 resolved from the remote machine: {machineName}."); + Logger.Log($"No IPv4 resolved from the remote machine: {machineName}."); return true; } @@ -1066,7 +1067,7 @@ namespace MouseWithoutBorders.Class if (localIPv4Addresses.Count == 0) { - Common.Log($"No IPv4 resolved from the local machine: {Common.MachineName}"); + Logger.Log($"No IPv4 resolved from the local machine: {Common.MachineName}"); return true; } @@ -1085,7 +1086,7 @@ namespace MouseWithoutBorders.Class } } - Common.Log($"Skip machine not in the same network: {machineName}."); + Logger.Log($"Skip machine not in the same network: {machineName}."); return false; } @@ -1105,7 +1106,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); return Enumerable.Empty(); } } @@ -1123,13 +1124,13 @@ namespace MouseWithoutBorders.Class if (Common.IsConnectedByAClientSocketTo(machineName)) { - Common.LogDebug(machineName + " is already connected by another client socket."); + Logger.LogDebug(machineName + " is already connected by another client socket."); return; } if (Common.IsConnectingByAClientSocketTo(machineName, ip)) { - Common.LogDebug($"{machineName}:{ip} is already being connected by another client socket."); + Logger.LogDebug($"{machineName}:{ip} is already being connected by another client socket."); return; } @@ -1138,7 +1139,7 @@ namespace MouseWithoutBorders.Class // Update the other server socket's machine name based on this corresponding client socket. UpdateTcpSockets(tcp, SocketStatus.Connecting); - Common.LogDebug(string.Format(CultureInfo.CurrentCulture, "=====> Connecting to: {0}:{1}", machineName, ip.ToString())); + Logger.LogDebug(string.Format(CultureInfo.CurrentCulture, "=====> Connecting to: {0}:{1}", machineName, ip.ToString())); long timeoutLeft; @@ -1151,7 +1152,7 @@ namespace MouseWithoutBorders.Class catch (ObjectDisposedException) { // When user reconnects. - Common.LogDebug($"tcpClient.Connect: The socket has already been disposed: {machineName}:{ip}"); + Logger.LogDebug($"tcpClient.Connect: The socket has already been disposed: {machineName}:{ip}"); return; } catch (SocketException e) @@ -1160,13 +1161,13 @@ namespace MouseWithoutBorders.Class if (timeoutLeft > 0) { - Common.LogDebug($"tcpClient.Connect: {timeoutLeft}: {e.Message}"); + Logger.LogDebug($"tcpClient.Connect: {timeoutLeft}: {e.Message}"); Thread.Sleep(1000); continue; } else { - Common.Log($"tcpClient.Connect: Unable to connect after a timeout: {machineName}:{ip} : {e.Message}"); + Logger.Log($"tcpClient.Connect: Unable to connect after a timeout: {machineName}:{ip} : {e.Message}"); string message = $"Connection timed out: {machineName}:{ip}"; @@ -1181,14 +1182,14 @@ namespace MouseWithoutBorders.Class } while (true); - Common.LogDebug($"=====> Connected: {tcpClient.Client.LocalEndPoint} => {machineName}: {ip}"); + Logger.LogDebug($"=====> Connected: {tcpClient.Client.LocalEndPoint} => {machineName}: {ip}"); // Sending/Receiving packages MainTCPRoutine(tcp, machineName, true); } catch (ObjectDisposedException e) { - Common.Log($"{nameof(StartNewTcpClientThread)}: The socket could have been closed/disposed due to machine switch: {e.Message}"); + Logger.Log($"{nameof(StartNewTcpClientThread)}: The socket could have been closed/disposed due to machine switch: {e.Message}"); } catch (SocketException e) { @@ -1201,12 +1202,12 @@ namespace MouseWithoutBorders.Class } else { - Common.TelemetryLogTrace($"{nameof(StartNewTcpClientThread)}: Error: {e.Message} on the IP Address: {localIP}", SeverityLevel.Error); + Logger.TelemetryLogTrace($"{nameof(StartNewTcpClientThread)}: Error: {e.Message} on the IP Address: {localIP}", SeverityLevel.Error); } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -1230,7 +1231,7 @@ namespace MouseWithoutBorders.Class if (e is ExpectedSocketException se && se.ShouldReconnect) { Common.PleaseReopenSocket = Common.REOPEN_WHEN_WSAECONNRESET; - Common.Log($"MainTCPRoutine: {nameof(FlagReopenSocketIfNeeded)}"); + Logger.Log($"MainTCPRoutine: {nameof(FlagReopenSocketIfNeeded)}"); } } @@ -1254,7 +1255,7 @@ namespace MouseWithoutBorders.Class if (currentSocket == null) { - Common.LogDebug($"{nameof(MainTCPRoutine)}: The socket could have been closed/disposed by other threads."); + Logger.LogDebug($"{nameof(MainTCPRoutine)}: The socket could have been closed/disposed by other threads."); return; } @@ -1283,21 +1284,21 @@ namespace MouseWithoutBorders.Class strIP = Common.GetRemoteStringIP(currentSocket, true); remoteMachine = string.IsNullOrEmpty(machineName) ? GetMachineNameFromSocket(currentSocket) : machineName; - Common.LogDebug($"MainTCPRoutine: Remote machineName/IP = {remoteMachine}/{strIP}"); + Logger.LogDebug($"MainTCPRoutine: Remote machineName/IP = {remoteMachine}/{strIP}"); } catch (ObjectDisposedException e) { Common.PleaseReopenSocket = Common.REOPEN_WHEN_WSAECONNRESET; UpdateTcpSockets(currentTcp, SocketStatus.ForceClosed); currentSocket.Close(); - Common.Log($"{nameof(MainTCPRoutine)}: The socket could have been closed/disposed by other threads: {e.Message}"); + Logger.Log($"{nameof(MainTCPRoutine)}: The socket could have been closed/disposed by other threads: {e.Message}"); } catch (Exception e) { UpdateTcpSockets(currentTcp, SocketStatus.ForceClosed); FlagReopenSocketIfNeeded(e); currentSocket.Close(); - Common.Log(e); + Logger.Log(e); } int errCount = 0; @@ -1314,7 +1315,7 @@ namespace MouseWithoutBorders.Class errCount++; string log = $"{nameof(MainTCPRoutine)}.TcpReceive error, invalid package from {remoteMachine}: {receivedCount}"; - Common.Log(log); + Logger.Log(log); if (receivedCount > 0) { @@ -1369,7 +1370,7 @@ namespace MouseWithoutBorders.Class if (++packageCount >= 10) { // Common.ShowToolTip("Invalid Security Key from " + remoteMachine, 5000); - Common.Log("More than 10 invalid packages received!"); + Logger.Log("More than 10 invalid packages received!"); package.Type = PackageType.Invalid; @@ -1393,7 +1394,7 @@ namespace MouseWithoutBorders.Class if (!remoteMachine.Equals(claimedMachineName, StringComparison.Ordinal)) { - Common.LogDebug($"DNS.RemoteMachineName({remoteMachine}) <> Claimed.MachineName({claimedMachineName}), using the claimed machine name."); + Logger.LogDebug($"DNS.RemoteMachineName({remoteMachine}) <> Claimed.MachineName({claimedMachineName}), using the claimed machine name."); remoteMachine = claimedMachineName; currentTcp.MachineName = remoteMachine; } @@ -1401,7 +1402,7 @@ namespace MouseWithoutBorders.Class // Double check to avoid a redundant client socket. if (isClient && Common.IsConnectedByAClientSocketTo(remoteMachine)) { - Common.LogDebug("=====> Duplicate connected client socket for: " + remoteMachine + ":" + strIP + " is being removed."); + Logger.LogDebug("=====> Duplicate connected client socket for: " + remoteMachine + ":" + strIP + " is being removed."); UpdateTcpSockets(currentTcp, SocketStatus.ForceClosed); currentSocket.Close(); return; @@ -1409,7 +1410,7 @@ namespace MouseWithoutBorders.Class if (remoteMachine.Equals(Common.MachineName, StringComparison.OrdinalIgnoreCase)) { - Common.LogDebug("Connected to/from local socket: " + strIP + (isClient ? "-Client" : "-Server")); + Logger.LogDebug("Connected to/from local socket: " + strIP + (isClient ? "-Client" : "-Server")); UpdateTcpSockets(currentTcp, SocketStatus.NA); Common.MMSleep(1); currentSocket.Close(); @@ -1421,7 +1422,7 @@ namespace MouseWithoutBorders.Class currentTcp.MachineId = (uint)remoteID; currentTcp.Status = SocketStatus.Connected; UpdateTcpSockets(currentTcp, SocketStatus.Connected); - Common.LogDebug("))))))))))))))) Machine got trusted: " + remoteMachine + ":" + strIP + ", Is client: " + isClient); + Logger.LogDebug("))))))))))))))) Machine got trusted: " + remoteMachine + ":" + strIP + ", Is client: " + isClient); if (Math.Abs(Common.GetTick() - Common.LastReconnectByHotKeyTime) < 5000) { @@ -1432,11 +1433,11 @@ namespace MouseWithoutBorders.Class if (Common.MachinePool.TryFindMachineByName(remoteMachine, out MachineInf machineInfo)) { - Common.LogDebug("Machine updated: " + remoteMachine + "/" + remoteID.ToString()); + Logger.LogDebug("Machine updated: " + remoteMachine + "/" + remoteID.ToString()); if (machineInfo.Name.Equals(Common.DesMachineName, StringComparison.OrdinalIgnoreCase)) { - Common.LogDebug("Des ID updated: " + Common.DesMachineID.ToString() + + Logger.LogDebug("Des ID updated: " + Common.DesMachineID.ToString() + "/" + remoteID.ToString()); Common.NewDesMachineID = Common.DesMachineID = remoteID; } @@ -1446,7 +1447,7 @@ namespace MouseWithoutBorders.Class } else { - Common.LogDebug("New machine connected: {0}.", remoteMachine); + Logger.LogDebug("New machine connected: {0}.", remoteMachine); if (!Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop) { @@ -1461,7 +1462,7 @@ namespace MouseWithoutBorders.Class } else { - Common.LogDebug("Invalid ACK from " + remoteMachine); + Logger.LogDebug("Invalid ACK from " + remoteMachine); UpdateTcpSockets(currentTcp, SocketStatus.InvalidKey); string remoteEP = currentSocket.RemoteEndPoint.ToString(); @@ -1500,7 +1501,7 @@ namespace MouseWithoutBorders.Class } else { - Common.Log(string.Format( + Logger.Log(string.Format( CultureInfo.CurrentCulture, "Unexpected package, size = {0}, type = {1}", receivedCount, @@ -1514,12 +1515,12 @@ namespace MouseWithoutBorders.Class if (lastRemoteMachineID != (long)remoteID) { _ = Interlocked.Exchange(ref lastRemoteMachineID, (long)remoteID); - Common.LogDebug($"MainTCPRoutine: Remote machine = {strIP}/{lastRemoteMachineID}"); + Logger.LogDebug($"MainTCPRoutine: Remote machine = {strIP}/{lastRemoteMachineID}"); } if (package.Type == PackageType.HandshakeAck) { - Common.LogDebug("Skipping the rest of the Handshake packages."); + Logger.LogDebug("Skipping the rest of the Handshake packages."); } else { @@ -1533,7 +1534,7 @@ namespace MouseWithoutBorders.Class UpdateTcpSockets(currentTcp, SocketStatus.Error); FlagReopenSocketIfNeeded(e); currentSocket.Close(); - Common.Log(e); + Logger.Log(e); break; } } @@ -1550,7 +1551,7 @@ namespace MouseWithoutBorders.Class do { - Common.LogDebug("SendClipboardData: Waiting for request..."); + Logger.LogDebug("SendClipboardData: Waiting for request..."); Socket s = null; try @@ -1559,25 +1560,25 @@ namespace MouseWithoutBorders.Class } catch (InvalidOperationException e) { - Common.Log($"The clipboard socket could have been closed. {e.Message}"); + Logger.Log($"The clipboard socket could have been closed. {e.Message}"); break; } catch (SocketException e) { if (e.ErrorCode == (int)SocketError.Interrupted) { - Common.Log("server.AcceptSocket: A blocking socket call was canceled."); + Logger.Log("server.AcceptSocket: A blocking socket call was canceled."); continue; } else { - Common.Log(e); + Logger.Log(e); break; } } catch (Exception e) { - Common.Log(e); + Logger.Log(e); break; } @@ -1595,7 +1596,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } } @@ -1607,7 +1608,7 @@ namespace MouseWithoutBorders.Class try { string remoteEndPoint = s.RemoteEndPoint.ToString(); - Common.LogDebug("SendClipboardData: Request accepted: " + s.LocalEndPoint.ToString() + "/" + remoteEndPoint); + Logger.LogDebug("SendClipboardData: Request accepted: " + s.LocalEndPoint.ToString() + "/" + remoteEndPoint); Common.IsDropping = false; Common.IsDragging = false; Common.DragMachine = (ID)1; @@ -1623,7 +1624,7 @@ namespace MouseWithoutBorders.Class } else { - Common.LogDebug($"{nameof(SendOrReceiveClipboardData)}: Clipboard connection accepted: " + remoteEndPoint); + Logger.LogDebug($"{nameof(SendOrReceiveClipboardData)}: Clipboard connection accepted: " + remoteEndPoint); Common.SetToggleIcon(new int[Common.TOGGLE_ICONS_SIZE] { Common.ICON_SMALL_CLIPBOARD, -1, -1, -1 }); } @@ -1638,7 +1639,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -1699,17 +1700,17 @@ namespace MouseWithoutBorders.Class catch (IOException e) { string log = $"{nameof(SendClipboardData)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } catch (SocketException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the connection is closed by the remote host."; - Common.Log(log); + Logger.Log(log); } catch (ObjectDisposedException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the socket is disposed by a machine switch for ex.."; - Common.Log(log); + Logger.Log(log); } } else if (!Common.IsClipboardDataImage && Common.LastClipboardData != null) @@ -1725,7 +1726,7 @@ namespace MouseWithoutBorders.Class { ecStream.Write(header, 0, header.Length); _ = SendData(s, ecStream, data); - Common.LogDebug("Text sent: " + data.Length.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("Text sent: " + data.Length.ToString(CultureInfo.CurrentCulture)); } s.Close(CLOSE_TIMEOUT); @@ -1733,17 +1734,17 @@ namespace MouseWithoutBorders.Class catch (IOException e) { string log = $"{nameof(SendClipboardData)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } catch (SocketException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the connection is closed by the remote host."; - Common.Log(log); + Logger.Log(log); } catch (ObjectDisposedException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the socket is disposed by a machine switch for ex.."; - Common.Log(log); + Logger.Log(log); } } else if (Common.LastClipboardData != null && Common.LastClipboardData.Length > 0) @@ -1756,28 +1757,28 @@ namespace MouseWithoutBorders.Class { ecStream.Write(header, 0, header.Length); _ = SendData(s, ecStream, data); - Common.LogDebug("Image sent: " + data.Length.ToString(CultureInfo.CurrentCulture)); + Logger.LogDebug("Image sent: " + data.Length.ToString(CultureInfo.CurrentCulture)); s.Close(CLOSE_TIMEOUT); } catch (IOException e) { string log = $"{nameof(SendClipboardData)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } catch (SocketException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the connection is closed by the remote host."; - Common.Log(log); + Logger.Log(log); } catch (ObjectDisposedException e) { string log = $"{nameof(SendClipboardData)}: {e.GetType()}/{e.Message}. This is expected when the socket is disposed by a machine switch for ex.."; - Common.Log(log); + Logger.Log(log); } } else { - Common.Log("No data available in clipboard or LastDragDropFile!"); + Logger.Log("No data available in clipboard or LastDragDropFile!"); s.Close(); } } @@ -1809,7 +1810,7 @@ namespace MouseWithoutBorders.Class ecStream.Flush(); - Common.LogDebug("File sent: " + fileName); + Logger.LogDebug("File sent: " + fileName); } return true; @@ -1819,11 +1820,11 @@ namespace MouseWithoutBorders.Class if (e is IOException) { string log = $"{nameof(SendFileEx)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } else { - Common.Log(e); + Logger.Log(e); } Common.ShowToolTip(e.Message, 1000, ToolTipIcon.Warning, Setting.Values.ShowClipNetStatus); @@ -1879,7 +1880,7 @@ namespace MouseWithoutBorders.Class } ecStream.Flush(); - Common.LogDebug("Data sent: " + data.Length.ToString(CultureInfo.InvariantCulture)); + Logger.LogDebug("Data sent: " + data.Length.ToString(CultureInfo.InvariantCulture)); r = true; } catch (Exception e) @@ -1887,11 +1888,11 @@ namespace MouseWithoutBorders.Class if (e is IOException) { string log = $"{nameof(SendData)}: Exception accessing the socket: {e.InnerException?.GetType()}/{e.Message}. (This is expected when the remote machine closes the connection during desktop switch or reconnection.)"; - Common.Log(log); + Logger.Log(log); } else { - Common.Log(e); + Logger.Log(e); } Common.ShowToolTip(e.Message, 1000, ToolTipIcon.Warning, Setting.Values.ShowClipNetStatus); @@ -1960,7 +1961,7 @@ namespace MouseWithoutBorders.Class Common.UpdateMachineTimeAndID(); Common.PleaseReopenSocket = Common.REOPEN_WHEN_HOTKEY; - Common.TelemetryLogTrace("MachineID conflict.", SeverityLevel.Information); + Logger.TelemetryLogTrace("MachineID conflict.", SeverityLevel.Information); } else { @@ -1971,7 +1972,7 @@ namespace MouseWithoutBorders.Class foreach (TcpSk t in tobeRemovedSockets) { t.Status = SocketStatus.ForceClosed; - Common.LogDebug($"Closing duplicated socket {t.MachineName}: {t.Address}"); + Logger.LogDebug($"Closing duplicated socket {t.MachineName}: {t.Address}"); } } @@ -2001,12 +2002,12 @@ namespace MouseWithoutBorders.Class catch (SocketException e) { string log = $"{nameof(UpdateTcpSockets)}: {e.GetType()}/{e.Message}. This is expected when the connection is closed by the remote host."; - Common.Log(log); + Logger.Log(log); } catch (ObjectDisposedException e) { string log = $"{nameof(UpdateTcpSockets)}: {e.GetType()}/{e.Message}. This is expected when the socket is disposed by a machine switch for ex.."; - Common.Log(log); + Logger.Log(log); } } } @@ -2048,7 +2049,7 @@ namespace MouseWithoutBorders.Class } else { - Common.Log("UpdateTcpSockets.Exception: Socket not found!"); + Logger.Log("UpdateTcpSockets.Exception: Socket not found!"); } foreach (TcpSk t in toBeRemoved) @@ -2060,7 +2061,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } diff --git a/src/modules/MouseWithoutBorders/App/Class/TcpServer.cs b/src/modules/MouseWithoutBorders/App/Class/TcpServer.cs index f7ea7ba094..ffff1ce76b 100644 --- a/src/modules/MouseWithoutBorders/App/Class/TcpServer.cs +++ b/src/modules/MouseWithoutBorders/App/Class/TcpServer.cs @@ -11,6 +11,8 @@ using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; +using MouseWithoutBorders.Core; + // // TCP Server implementation. // @@ -33,7 +35,7 @@ namespace MouseWithoutBorders.Class internal TcpServer(int port, ParameterizedThreadStart job) { - Common.Log($"TCP listening on port: {port}"); + Logger.Log($"TCP listening on port: {port}"); Name = port.ToString(CultureInfo.CurrentCulture); server = TcpListener.Create(port); StartServer(job); @@ -79,7 +81,7 @@ namespace MouseWithoutBorders.Class } else { - Common.TelemetryLogTrace($"Error listening on: {server.LocalEndpoint}: {e.ErrorCode}/{e.Message}", SeverityLevel.Error); + Logger.TelemetryLogTrace($"Error listening on: {server.LocalEndpoint}: {e.ErrorCode}/{e.Message}", SeverityLevel.Error); throw; } } @@ -99,7 +101,7 @@ namespace MouseWithoutBorders.Class } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } diff --git a/src/modules/MouseWithoutBorders/App/Core/Logger.cs b/src/modules/MouseWithoutBorders/App/Core/Logger.cs new file mode 100644 index 0000000000..8d4c42e373 --- /dev/null +++ b/src/modules/MouseWithoutBorders/App/Core/Logger.cs @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Net; +using System.Net.Sockets; +using System.Reflection; +using System.Text; +using System.Windows.Forms; + +// +// Logging. +// +// +// 2008 created by Truong Do (ductdo). +// 2009-... modified by Truong Do (TruongDo). +// 2023- Included in PowerToys. +// +using MouseWithoutBorders.Class; +using MouseWithoutBorders.Exceptions; + +namespace MouseWithoutBorders.Core; + +internal static class Logger +{ + internal static readonly string[] AllLogs = new string[MAX_LOG]; + private static readonly object AllLogsLock = new(); + internal static readonly ConcurrentDictionary LogCounter = new(); + private const int MAX_LOG = 10000; + private static int allLogsIndex; + + private const int MaxLogExceptionPerHour = 1000; + private static int lastHour; + private static int exceptionCount; + + internal static void TelemetryLogTrace(string log, SeverityLevel severityLevel, bool flush = false) + { + int logCount = LogCounter.AddOrUpdate(log, 1, (key, value) => value + 1); + Logger.Log(log); + } + + internal static void Log(Exception e) + { + if (e is not KnownException) + { + string exText = e.ToString(); + + Log($"!Exception!: {exText}"); + + if (DateTime.UtcNow.Hour != lastHour) + { + lastHour = DateTime.UtcNow.Hour; + exceptionCount = 0; + } + + if (exceptionCount < MaxLogExceptionPerHour) + { + exceptionCount++; + } + else if (exceptionCount != short.MaxValue) + { + exceptionCount = short.MaxValue; + } + } + } + + private const string HeaderSENT = + "Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13}"; + + private const string HeaderRECEIVED = + "Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15}"; + + internal static void LogDebug(string log, bool clearLog = false) + { +#if DEBUG + Log(log, clearLog); +#endif + } + + internal static void Log(string log, bool clearLog = false) + { + log = DateTime.Now.ToString("MM/dd HH:mm:ss.fff", CultureInfo.InvariantCulture) + $"({Thread.CurrentThread.ManagedThreadId})" + log; + + ManagedCommon.Logger.LogInfo(log); + lock (AllLogsLock) + { + if (clearLog) + { + allLogsIndex = 0; + } + + AllLogs[allLogsIndex] = log; + allLogsIndex = (allLogsIndex + 1) % MAX_LOG; + } + } + + internal static void LogDebug(string format, params object[] args) + { +#if DEBUG + Logger.Log(format, args); +#endif + } + + private static void Log(string format, params object[] args) + { + Logger.Log(string.Format(CultureInfo.InvariantCulture, format, args)); + } + + private static PackageMonitor lastPackageSent; + private static PackageMonitor lastPackageReceived; + + [Conditional("DEBUG")] + internal static void LogAll() + { + string log; + + if (!lastPackageSent.Equals(Common.PackageSent)) + { + log = string.Format( + CultureInfo.CurrentCulture, + "SENT:" + HeaderSENT, + Common.PackageSent.Heartbeat, + Common.PackageSent.Keyboard, + Common.PackageSent.Mouse, + Common.PackageSent.Hello, + Common.PackageSent.Matrix, + Common.PackageSent.ClipboardText, + Common.PackageSent.ClipboardImage, + Common.PackageSent.ByeBye, + Common.PackageSent.Clipboard, + Common.PackageSent.ClipboardDragDrop, + Common.PackageSent.ClipboardDragDropEnd, + Common.PackageSent.ExplorerDragDrop, + Common.inputEventCount, + Common.PackageSent.Nil); + Log(log); + lastPackageSent = Common.PackageSent; // Copy data + } + + if (!lastPackageReceived.Equals(Common.PackageReceived)) + { + log = string.Format( + CultureInfo.CurrentCulture, + "RECEIVED:" + HeaderRECEIVED, + Common.PackageReceived.Heartbeat, + Common.PackageReceived.Keyboard, + Common.PackageReceived.Mouse, + Common.PackageReceived.Hello, + Common.PackageReceived.Matrix, + Common.PackageReceived.ClipboardText, + Common.PackageReceived.ClipboardImage, + Common.PackageReceived.ByeBye, + Common.PackageReceived.Clipboard, + Common.PackageReceived.ClipboardDragDrop, + Common.PackageReceived.ClipboardDragDropEnd, + Common.PackageReceived.ExplorerDragDrop, + Common.invalidPackageCount, + Common.PackageReceived.Nil, + Common.processedPackageCount, + Common.skippedPackageCount); + Log(log); + lastPackageReceived = Common.PackageReceived; + } + } + + internal static void GenerateLog() + { + int l = Setting.Values.DumpObjectsLevel; + if (l is > 0 and < 10) + { + Logger.DumpObjects(l); + } + } + + private static List myThreads; + + internal static void DumpObjects(int level) + { + try + { + string logFile = Path.Combine(Common.RunWithNoAdminRight ? Path.GetTempPath() : Path.GetDirectoryName(Application.ExecutablePath), "MagicMouse.log"); + + StringBuilder sb = new(1000000); + string log; + + myThreads = new List(); + + foreach (ProcessThread t in Process.GetCurrentProcess().Threads) + { + myThreads.Add(t); + } + + _ = Logger.PrivateDump(sb, AllLogs, "[Program logs]\r\n===============\r\n", 0, level, false); + _ = Logger.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, level, false); + sb.AppendLine("[Logger]\r\n==============="); + Logger.DumpType(sb, typeof(Logger), 0, level); + + log = string.Format( + CultureInfo.CurrentCulture, + "{0} {1}\r\n{2}\r\n\r\n{3}", + Application.ProductName, + Application.ProductVersion, + "Private Mem: " + (Process.GetCurrentProcess().PrivateMemorySize64 / 1024).ToString(CultureInfo.CurrentCulture) + "KB", + sb.ToString()); + + if (!string.IsNullOrEmpty(Common.myKey)) + { + log = log.Replace(Common.MyKey, Common.GetDebugInfo(Common.MyKey)); + } + + log += Thread.DumpThreadsStack(); + log += $"\r\nCurrent process session: {Process.GetCurrentProcess().SessionId}, active console session: {NativeMethods.WTSGetActiveConsoleSessionId()}."; + + File.WriteAllText(logFile, log); + + if (Common.RunOnLogonDesktop || Common.RunOnScrSaverDesktop) + { + _ = MessageBox.Show("Dump file created: " + logFile, Application.ProductName); + } + else + { + Common.ShowToolTip("Dump file created: " + logFile + " and placed in the Clipboard.", 10000); + Clipboard.SetText(logFile); + } + } + catch (Exception e) + { + _ = MessageBox.Show(e.Message + "\r\n" + e.StackTrace, Application.ProductName); + } + } + + internal static bool PrivateDump(StringBuilder sb, object obj, string objName, int level, int maxLevel, bool stop) + { + Type t; + string padStr = string.Empty; + string[] strArr; + string objString; + + if (obj == null || (maxLevel >= 0 && level >= maxLevel) || obj is Cursor) + { + return false; + } + + for (int i = 0; i < level; i++) + { + padStr += i < level - 1 ? "-" : padStr += string.Empty; + } + + objString = obj.ToString(); + t = obj.GetType(); + strArr = new string[7]; + strArr[0] = padStr; + strArr[1] = objName; + + // strArr[2] = " "; + // strArr[3] = t.FullName; + strArr[4] = " = "; + strArr[5] = objName.Equals("myKey", StringComparison.OrdinalIgnoreCase) + ? Common.GetDebugInfo(objString) + : objName.Equals("lastClipboardObject", StringComparison.OrdinalIgnoreCase) + ? string.Empty + : objString + .Replace("System.Windows.Forms.", string.Empty) + .Replace("System.Net.Sockets.", string.Empty) + .Replace("System.Security.Cryptography.", string.Empty) + .Replace("System.Threading.", string.Empty) + .Replace("System.ComponentModel.", string.Empty) + .Replace("System.Runtime.", string.Empty) + .Replace("System.Drawing.", string.Empty) + .Replace("System.Object", "O") + .Replace("System.Diagnostics.", string.Empty) + .Replace("System.Collections.", string.Empty) + .Replace("System.Drawing.", string.Empty) + .Replace("System.Int", string.Empty) + .Replace("System.EventHandler.", string.Empty); + strArr[6] = "\r\n"; + _ = sb.Append(string.Concat(strArr).Replace(Common.BinaryName, "MM")); + + if (stop || t.IsPrimitive) + { + return false; + } + + Logger.DumpObject(sb, obj, level, t, maxLevel); + return true; + } + + internal static void DumpObject(StringBuilder sb, object obj, int level, Type t, int maxLevel) + { + int i; + bool stop; + if (t == typeof(Delegate)) + { + return; + } + + FieldInfo[] fi; + string type; + + if (obj is PackageType or string or AddressFamily or ID or IPAddress) + { + return; + } + + type = obj.GetType().ToString(); + + if (type.EndsWith("type", StringComparison.CurrentCultureIgnoreCase) || type.Contains("Cryptography") + || type.EndsWith("AsyncEventBits", StringComparison.CurrentCultureIgnoreCase)) + { + return; + } + + stop = obj == null || obj is DATA || obj.GetType().BaseType == typeof(ValueType) + || obj.GetType().Namespace.Contains("System.Windows"); + fi = t.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); + + foreach (FieldInfo f in fi) + { + if (f.GetValue(obj) != AllLogs) + { + _ = PrivateDump(sb, f.GetValue(obj), f.Name, level + 1, maxLevel, stop); + } + } + + if (obj is Dictionary>) + { + Dictionary> d = obj as Dictionary>; + + foreach (string k in d.Keys) + { + if (d.TryGetValue(k, out List l)) + { + foreach (IPAddress ip in l) + { + _ = PrivateDump(sb, ip, "[" + k + "]", level + 1, maxLevel, false); + } + } + } + } + + if (obj is Array) + { + try + { + if (obj is MachineInf[]) + { + MachineInf[] os = (MachineInf[])obj; + + for (i = 0; i < os.GetLength(0); i++) + { + _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); + } + } + else if (obj is int[] || obj is uint[]) + { + int[] os = (int[])obj; + + for (i = 0; i < os.GetLength(0); i++) + { + _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); + } + } + else if (obj is short[] || obj is ushort[]) + { + short[] os = (short[])obj; + + for (i = 0; i < os.GetLength(0); i++) + { + _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); + } + } + else if (obj is TcpClient[] || obj is IPAddress[] || obj is TcpSk[] || obj is string[] + || obj is TcpServer[] + || obj is ProcessThread[] || obj is Thread[]) + { + object[] os = (object[])obj; + + for (i = 0; i < os.GetLength(0); i++) + { + _ = PrivateDump(sb, os[i], "[" + i + "]", level + 1, maxLevel, false); + } + } + else + { + _ = PrivateDump(sb, obj.GetType().ToString() + ": N/A", obj.GetType().ToString(), level + 1, maxLevel, false); + } + } + catch (Exception) + { + } + } + } + + internal static void DumpType(StringBuilder sb, Type typeToDump, int level, int maxLevel) + { + if ((typeToDump == typeof(Delegate)) + || (typeToDump == typeof(PackageType)) + || (typeToDump == typeof(string)) + || (typeToDump == typeof(AddressFamily)) + || (typeToDump == typeof(ID)) + || (typeToDump == typeof(IPAddress))) + { + return; + } + + var typeFullName = typeToDump.ToString(); + if (typeFullName.EndsWith("type", StringComparison.CurrentCultureIgnoreCase) + || typeFullName.Contains("Cryptography") + || typeFullName.EndsWith("AsyncEventBits", StringComparison.CurrentCultureIgnoreCase)) + { + return; + } + + var stop = (typeToDump == null) + || (typeToDump == typeof(DATA)) + || (typeToDump.BaseType == typeof(ValueType)) + || typeToDump.Namespace.Contains("System.Windows"); + + var fieldInfos = typeToDump.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); + foreach (var fieldInfo in fieldInfos) + { + if (fieldInfo.GetValue(null) != AllLogs) + { + _ = Logger.PrivateDump(sb, fieldInfo.GetValue(null), fieldInfo.Name, level + 1, maxLevel, stop); + } + } + } + + internal static string GetStackTrace(StackTrace st) + { + string rv = string.Empty; + + for (int i = 0; i < st.FrameCount; i++) + { + StackFrame sf = st.GetFrame(i); + rv += sf.GetMethod() + " <= "; + } + + return rv; + } +} diff --git a/src/modules/MouseWithoutBorders/App/Form/Settings/SettingsForm.cs b/src/modules/MouseWithoutBorders/App/Form/Settings/SettingsForm.cs index c8977b782a..768e0bdadc 100644 --- a/src/modules/MouseWithoutBorders/App/Form/Settings/SettingsForm.cs +++ b/src/modules/MouseWithoutBorders/App/Form/Settings/SettingsForm.cs @@ -5,7 +5,7 @@ using System; using System.Drawing; using System.Windows.Forms; - +using MouseWithoutBorders.Core; using MouseWithoutBorders.Form.Settings; namespace MouseWithoutBorders @@ -23,9 +23,9 @@ namespace MouseWithoutBorders toolTipManual.ToolTipTitle = Application.ProductName; Text = Application.ProductName; - Common.LogDebug("FIRST RUN, SHOWING THE FIRST SETUP PAGE."); + Logger.LogDebug("FIRST RUN, SHOWING THE FIRST SETUP PAGE."); - Common.LogDebug($"{nameof(Common.RunWithNoAdminRight)} = {Common.RunWithNoAdminRight}"); + Logger.LogDebug($"{nameof(Common.RunWithNoAdminRight)} = {Common.RunWithNoAdminRight}"); if (Common.RunWithNoAdminRight) { @@ -43,7 +43,7 @@ namespace MouseWithoutBorders if (_currentPage != null) { - Common.LogDebug(_currentPage.Name + " closing."); + Logger.LogDebug(_currentPage.Name + " closing."); _currentPage.OnPageClosing(); } @@ -67,7 +67,7 @@ namespace MouseWithoutBorders if (page != null) { - Common.LogDebug("GOING TO NEXT PAGE: " + page.Name); + Logger.LogDebug("GOING TO NEXT PAGE: " + page.Name); page.BackColor = Color.Transparent; page.NextPage += PageNextPage; page.Location = contentPanel.Location; diff --git a/src/modules/MouseWithoutBorders/App/Form/Settings/SetupPage3a.cs b/src/modules/MouseWithoutBorders/App/Form/Settings/SetupPage3a.cs index bd08682585..4c8c3cd2eb 100644 --- a/src/modules/MouseWithoutBorders/App/Form/Settings/SetupPage3a.cs +++ b/src/modules/MouseWithoutBorders/App/Form/Settings/SetupPage3a.cs @@ -7,6 +7,7 @@ using System.Drawing; using System.Windows.Forms; using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Properties; namespace MouseWithoutBorders @@ -42,7 +43,7 @@ namespace MouseWithoutBorders private void ShowStatus(string status) { labelStatus.Text = status; - Common.Log(status); + Logger.Log(status); } public override void OnPageClosing() diff --git a/src/modules/MouseWithoutBorders/App/Form/frmInputCallback.cs b/src/modules/MouseWithoutBorders/App/Form/frmInputCallback.cs index fdb76ed901..edd35035ad 100644 --- a/src/modules/MouseWithoutBorders/App/Form/frmInputCallback.cs +++ b/src/modules/MouseWithoutBorders/App/Form/frmInputCallback.cs @@ -16,6 +16,7 @@ using System.Windows.Forms; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; [module: SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions", Scope = "member", Target = "MouseWithoutBorders.frmInputCallback.#InstallKeyboardAndMouseHook()", Justification = "Dotnet port with style preservation")] @@ -65,7 +66,7 @@ namespace MouseWithoutBorders Common.Hook.MouseEvent += new InputHook.MouseEvHandler(Common.MouseEvent); Common.Hook.KeyboardEvent += new InputHook.KeybdEvHandler(Common.KeybdEvent); - Common.Log("(((((Keyboard/Mouse hooks installed/reinstalled!)))))"); + Logger.Log("(((((Keyboard/Mouse hooks installed/reinstalled!)))))"); /* The hook is called in the context of the thread that installed it. * The call is made by sending a message to the thread that installed the hook. * Therefore, the thread that installed the hook must have a message loop!!! diff --git a/src/modules/MouseWithoutBorders/App/Form/frmMatrix.cs b/src/modules/MouseWithoutBorders/App/Form/frmMatrix.cs index d00215e01a..fff0199069 100644 --- a/src/modules/MouseWithoutBorders/App/Form/frmMatrix.cs +++ b/src/modules/MouseWithoutBorders/App/Form/frmMatrix.cs @@ -21,7 +21,7 @@ using Microsoft.PowerToys.Telemetry; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; - +using MouseWithoutBorders.Core; using Timer = System.Windows.Forms.Timer; [module: SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions", Scope = "member", Target = "MouseWithoutBorders.frmMatrix.#buttonOK_Click(System.Object,System.EventArgs)", Justification = "Dotnet port with style preservation")] @@ -151,7 +151,7 @@ namespace MouseWithoutBorders if (Common.MachineMatrix != null && Common.MachineMatrix.Length == Common.MAX_MACHINE) { - Common.LogDebug("LoadMachines: Machine Matrix: " + Setting.Values.MachineMatrixString); + Logger.LogDebug("LoadMachines: Machine Matrix: " + Setting.Values.MachineMatrixString); for (int i = 0; i < Common.MAX_MACHINE; i++) { @@ -329,8 +329,8 @@ namespace MouseWithoutBorders } catch (Exception ee) { - Common.Log(ee); - Common.Log(rv.ToString(CultureInfo.CurrentCulture)); + Logger.Log(ee); + Logger.Log(rv.ToString(CultureInfo.CurrentCulture)); } } diff --git a/src/modules/MouseWithoutBorders/App/Form/frmScreen.cs b/src/modules/MouseWithoutBorders/App/Form/frmScreen.cs index bf79bef841..0df3454d80 100644 --- a/src/modules/MouseWithoutBorders/App/Form/frmScreen.cs +++ b/src/modules/MouseWithoutBorders/App/Form/frmScreen.cs @@ -22,6 +22,7 @@ using Microsoft.PowerToys.Telemetry; // 2023- Included in PowerToys. // using MouseWithoutBorders.Class; +using MouseWithoutBorders.Core; using MouseWithoutBorders.Properties; using Timer = System.Windows.Forms.Timer; @@ -81,7 +82,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -232,7 +233,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -273,7 +274,7 @@ namespace MouseWithoutBorders { BackColor = Color.White; Opacity = 0.15; - Common.Log(ex); + Logger.Log(ex); } helperTimer = new System.Windows.Forms.Timer(); @@ -355,7 +356,7 @@ namespace MouseWithoutBorders if (!Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop && !Common.GetUserName()) { // While Windows 8 is hybrid-shutting down, user name would be empty (as returned from the .Net API), we should not do anything in this case. - Common.LogDebug("No active user."); + Logger.LogDebug("No active user."); Thread.Sleep(1000); busy = false; return; @@ -432,7 +433,7 @@ namespace MouseWithoutBorders if (!Common.AtLeastOneSocketEstablished()) { Common.GetMachineName(); - Common.LogDebug("Common.pleaseReopenSocket: " + Common.PleaseReopenSocket.ToString(CultureInfo.InvariantCulture)); + Logger.LogDebug("Common.pleaseReopenSocket: " + Common.PleaseReopenSocket.ToString(CultureInfo.InvariantCulture)); Common.ReopenSockets(false); Common.NewDesMachineID = Common.DesMachineID = Common.MachineID; } @@ -545,7 +546,7 @@ namespace MouseWithoutBorders if (count % 20 == 0) { - Common.LogAll(); + Logger.LogAll(); // Need to review this code on why it is needed (moved from MoveToMyNeighbourIfNeeded(...)) for (int i = 0; i < Common.MachineMatrix.Length; i++) @@ -579,14 +580,14 @@ namespace MouseWithoutBorders if (!Common.RunOnLogonDesktop && !Common.RunOnScrSaverDesktop && Common.IsMyDesktopActive() && (rv = Common.SendMessageToHelper(0x400, IntPtr.Zero, IntPtr.Zero)) <= 0) { - Common.TelemetryLogTrace($"{Common.HELPER_FORM_TEXT} not found: {rv}", SeverityLevel.Warning); + Logger.TelemetryLogTrace($"{Common.HELPER_FORM_TEXT} not found: {rv}", SeverityLevel.Warning); } } } } catch (Exception ex) { - Common.Log(ex); + Logger.Log(ex); } finally { @@ -678,7 +679,7 @@ namespace MouseWithoutBorders p.Dispose(); #endif - Common.LogDebug($"Changing icon to {iconCode}."); + Logger.LogDebug($"Changing icon to {iconCode}."); if (NotifyIcon.Icon != null) { @@ -690,13 +691,13 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } internal void MenuAllPC_Click(object sender, EventArgs e) { - Common.LogDebug("menuAllPC_Click"); + Logger.LogDebug("menuAllPC_Click"); Common.SwitchToMultipleMode(MenuAllPC.Checked, true); CurIcon = MenuAllPC.Checked ? Common.ICON_ALL : Common.ICON_ONE; ChangeIcon(CurIcon); @@ -801,7 +802,7 @@ namespace MouseWithoutBorders if (h.ToInt32() > 0) { - Common.LogDebug("Hide Mouse Without Borders Helper."); + Logger.LogDebug("Hide Mouse Without Borders Helper."); // Common.ShowWindow(h, 1); _ = NativeMethods.ShowWindow(h, 0); @@ -813,7 +814,7 @@ namespace MouseWithoutBorders break; case NativeMethods.WM_CHECK_EXPLORER_DRAG_DROP: - Common.LogDebug("Got WM_CHECK_EXPLORER_DRAG_DROP!"); + Logger.LogDebug("Got WM_CHECK_EXPLORER_DRAG_DROP!"); Common.DragDropStep04(); break; @@ -825,7 +826,7 @@ namespace MouseWithoutBorders break; case WM_QUERYENDSESSION: - Common.LogDebug("WM_QUERYENDSESSION..."); + Logger.LogDebug("WM_QUERYENDSESSION..."); Common.StartServiceAndSendLogoffSignal(); break; @@ -993,7 +994,7 @@ namespace MouseWithoutBorders } catch (Exception e) { - Common.Log(e); + Logger.Log(e); } } @@ -1210,7 +1211,7 @@ namespace MouseWithoutBorders private void MenuGenDumpFile_Click(object sender, EventArgs e) { - Common.GenerateLog(); + Logger.GenerateLog(); } private void MainMenu_Opening(object sender, CancelEventArgs e) diff --git a/src/modules/MouseWithoutBorders/App/Helper/FormHelper.cs b/src/modules/MouseWithoutBorders/App/Helper/FormHelper.cs index f36bd0292a..969ba9db37 100644 --- a/src/modules/MouseWithoutBorders/App/Helper/FormHelper.cs +++ b/src/modules/MouseWithoutBorders/App/Helper/FormHelper.cs @@ -100,7 +100,7 @@ namespace MouseWithoutBorders if (Process.GetCurrentProcess().SessionId != NativeMethods.WTSGetActiveConsoleSessionId()) { - Logger.LogEvent(Application.ProductName + " cannot be used in a remote desktop or virtual machine session."); + EventLogger.LogEvent(Application.ProductName + " cannot be used in a remote desktop or virtual machine session."); } else { @@ -135,7 +135,7 @@ namespace MouseWithoutBorders } catch (Exception ex) { - Logger.LogEvent("FormHelper_DragEnter: " + ex.Message, EventLogEntryType.Error); + EventLogger.LogEvent("FormHelper_DragEnter: " + ex.Message, EventLogEntryType.Error); QuitDueToCommunicationError(); } } @@ -164,11 +164,11 @@ namespace MouseWithoutBorders { try { - Logger.LogEvent(log, EventLogEntryType.Warning); + EventLogger.LogEvent(log, EventLogEntryType.Warning); } catch (Exception e) { - Logger.LogEvent(log + " ==> SendLog Exception: " + e.Message, EventLogEntryType.Warning); + EventLogger.LogEvent(log + " ==> SendLog Exception: " + e.Message, EventLogEntryType.Warning); } } @@ -343,7 +343,7 @@ namespace MouseWithoutBorders } catch (Exception ex) { - Logger.LogEvent("WM_DRAWCLIPBOARD: " + ex.Message, EventLogEntryType.Error); + EventLogger.LogEvent("WM_DRAWCLIPBOARD: " + ex.Message, EventLogEntryType.Error); QuitDueToCommunicationError(); } diff --git a/src/modules/MouseWithoutBorders/App/Properties/AssemblyInfo.cs b/src/modules/MouseWithoutBorders/App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b031b89509 --- /dev/null +++ b/src/modules/MouseWithoutBorders/App/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("MouseWithoutBorders.UnitTests")] diff --git a/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.expected.txt b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.expected.txt new file mode 100644 index 0000000000..1a20c67b31 --- /dev/null +++ b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.expected.txt @@ -0,0 +1,404 @@ +[Program logs] +=============== + = System.String[] +[Other Logs] +=============== + = MouseWithoutBorders.Common +lastClipboardEventTime = 0 +clipboardCopiedTime = 0 +Comma = System.Char[] +--System.Char[] = System.Char[]: N/A +Star = System.Char[] +--System.Char[] = System.Char[]: N/A +NullSeparator = System.Char[] +--System.Char[] = System.Char[]: N/A +k__BackingField = NONE +k__BackingField = 0 +k__BackingField = False +lastClipboardObject = +k__BackingField = False +ClipboardThreadOldLock = O +screenWidth = 0 +screenHeight = 0 +lastX = 0 +lastY = 0 +mainFormVisible = True +runOnLogonDesktop = False +runOnScrSaverDesktop = False +toggleIconsIndex = 0 +EvSwitch = EventWaitHandle +lastPos = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +switchCount = 0 +lastReconnectByHotKeyTime = 0 +tcpPort = 0 +secondOpenSocketTry = False +binaryName = MM +k__BackingField = 0 +k__BackingField = False +k__BackingField = False +socketMutexBalance = 0 +k__BackingField = False +k__BackingField = 0 +k__BackingField = 0 +InputSimulationLock = O +lastSendNextMachine = 0 +lastInputEventCount = 0 +lastRealInputEventCount = 0 +minSendTime = 9223372036854775807 +avgSendTime = 0 +maxSendTime = 0 +totalSendCount = 0 +totalSendTime = 0 +isDragging = False +dragDropStep05ExCalledByIpc = 0 +isDropping = False +dragMachine = NONE +k__BackingField = False +magicNumber = 0 +ran = System.Random +--_impl = System.Random+XoshiroImpl +----_s0 = ???????????? +----_s1 = ???????????? +----_s2 = ???????????? +----_s3 = ???????????? +--k__BackingField = System.Random+ThreadSafeRandom +InitialIV = ???????????? +k__BackingField = False +k__BackingField = False +LegalKeyDictionary = Concurrent.ConcurrentDictionary`2[System.String,System.Byte[]] +--_tables = Concurrent.ConcurrentDictionary`2+Tables[System.String,System.Byte[]] +----_comparer = Generic.NonRandomizedStringEqualityComparer+OrdinalIgnoreCaseComparer +----_buckets = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][] +------System.Collections.Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][] = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][]: N/A +----_fastModBucketsMultiplier = 498560650640798693 +----_locks = O[] +------System.Object[] = O[]: N/A +----_countPerLock = 32[] +------[0] = 0 +------[1] = 0 +------[2] = 0 +------[3] = 0 +------[4] = 0 +------[5] = 0 +------[6] = 0 +------[7] = 0 +------[8] = 0 +------[9] = 0 +------[10] = 0 +------[11] = 0 +------[12] = 0 +------[13] = 0 +------[14] = 0 +------[15] = 0 +--_budget = 2 +--_growLockArray = True +--_comparerIsDefaultForClasses = False +KeybdPackage = MouseWithoutBorders.DATA +--Type = 0 +--Id = 0 +--Src = NONE +--Des = NONE +--DateTime = 0 +--Kd = MouseWithoutBorders.KEYBDDATA +--Md = MouseWithoutBorders.MOUSEDATA +--Machine1 = NONE +--Machine2 = NONE +--Machine3 = NONE +--Machine4 = NONE +--PostAction = Other +--machineNameP1 = 0 +--machineNameP2 = 0 +--machineNameP3 = 0 +--machineNameP4 = 0 +MousePackage = MouseWithoutBorders.DATA +--Type = 0 +--Id = 0 +--Src = NONE +--Des = NONE +--DateTime = 0 +--Kd = MouseWithoutBorders.KEYBDDATA +--Md = MouseWithoutBorders.MOUSEDATA +--Machine1 = NONE +--Machine2 = NONE +--Machine3 = NONE +--Machine4 = NONE +--PostAction = Other +--machineNameP1 = 0 +--machineNameP2 = 0 +--machineNameP3 = 0 +--machineNameP4 = 0 +inputEventCount = 0 +invalidPackageCount = 0 +MOVE_MOUSE_RELATIVE = 100000 +XY_BY_PIXEL = 300000 +k__BackingField = 0 +actualLastPos = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +myLastX = 0 +myLastY = 0 +signalHelperToExit = False +signalWatchDogToExit = False +WndProcCounter = 0 +initDone = False +REOPEN_WHEN_WSAECONNRESET = -10054 +REOPEN_WHEN_HOTKEY = -10055 +PleaseReopenSocket = 0 +ReopenSocketDueToReadError = False +k__BackingField = ???????????? +--_dateData = ???????????? +--MinValue = 01/01/0001 00:00:00 +--MaxValue = 31/12/9999 23:59:59 +--UnixEpoch = 01/01/1970 00:00:00 +lastReleaseAllKeysCall = 0 +McMatrixLock = O +desMachineID = NONE +DesMachineName = +newDesMachineID = NONE +newDesMachineIdEx = NONE +dropMachineID = NONE +lastJump = ???????????? +desktopBounds = MouseWithoutBorders.MyRectangle +--Left = 0 +--Top = 0 +--Right = 0 +--Bottom = 0 +primaryScreenBounds = MouseWithoutBorders.MyRectangle +--Left = 0 +--Top = 0 +--Right = 0 +--Bottom = 0 +SwitchLocation = MouseWithoutBorders.Class.MouseLocation +--k__BackingField = 0 +--k__BackingField = 0 +--k__BackingField = 0 +PackageSent = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +PackageReceived = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +PackageID = 0 +QUEUE_SIZE = 50 +RecentProcessedPackageIDs = 32[] +--[0] = 0 +--[1] = 0 +--[2] = 0 +--[3] = 0 +--[4] = 0 +--[5] = 0 +--[6] = 0 +--[7] = 0 +--[8] = 0 +--[9] = 0 +--[10] = 0 +--[11] = 0 +--[12] = 0 +--[13] = 0 +--[14] = 0 +--[15] = 0 +--[16] = 0 +--[17] = 0 +--[18] = 0 +--[19] = 0 +--[20] = 0 +--[21] = 0 +--[22] = 0 +--[23] = 0 +--[24] = 0 +--[25] = 0 +--[26] = 0 +--[27] = 0 +--[28] = 0 +--[29] = 0 +--[30] = 0 +--[31] = 0 +--[32] = 0 +--[33] = 0 +--[34] = 0 +--[35] = 0 +--[36] = 0 +--[37] = 0 +--[38] = 0 +--[39] = 0 +--[40] = 0 +--[41] = 0 +--[42] = 0 +--[43] = 0 +--[44] = 0 +--[45] = 0 +--[46] = 0 +--[47] = 0 +--[48] = 0 +--[49] = 0 +recentProcessedPackageIndex = 0 +processedPackageCount = 0 +skippedPackageCount = 0 +k__BackingField = 0 +lastXY = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +shownErrMessage = False +lastStartServiceTime = ???????????? +--_dateData = ???????????? +--MinValue = 01/01/0001 00:00:00 +--MaxValue = 31/12/9999 23:59:59 +--UnixEpoch = 01/01/1970 00:00:00 +SensitivePoints = Generic.List`1[Point] +--_items = Point[] +----System.Drawing.Point[] = Point[]: N/A +--_size = 0 +--_version = 0 +--s_emptyArray = Point[] +----System.Drawing.Point[] = Point[]: N/A +p = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +k__BackingField = False +BIG_CLIPBOARD_DATA_TIMEOUT = 30000 +MAX_CLIPBOARD_DATA_SIZE_CAN_BE_SENT_INSTANTLY_TCP = 1048576 +MAX_CLIPBOARD_FILE_SIZE_CAN_BE_SENT = 104857600 +TEXT_HEADER_SIZE = 12 +DATA_SIZE = 48 +TEXT_TYPE_SEP = {4CFF57F7-BEDD-43d5-AE8F-27A61E886F2F} +TOGGLE_ICONS_SIZE = 4 +ICON_ONE = 0 +ICON_ALL = 1 +ICON_SMALL_CLIPBOARD = 2 +ICON_BIG_CLIPBOARD = 3 +ICON_ERROR = 4 +JUST_GOT_BACK_FROM_SCREEN_SAVER = 9999 +NETWORK_STREAM_BUF_SIZE = 1048576 +SymAlBlockSize = 16 +PW_LENGTH = 16 +HELPER_FORM_TEXT = Mouse without Borders Helper +HelperProcessName = PowerToys.MouseWithoutBordersHelper +MAX_MACHINE = 4 +MAX_SOCKET = 8 +HEARTBEAT_TIMEOUT = 1500000 +SKIP_PIXELS = 1 +JUMP_PIXELS = 2 +PACKAGE_SIZE = 32 +PACKAGE_SIZE_EX = 64 +WP_PACKAGE_SIZE = 6 +KEYEVENTF_KEYDOWN = 1 +KEYEVENTF_KEYUP = 2 +WH_MOUSE = 7 +WH_KEYBOARD = 2 +WH_MOUSE_LL = 14 +WH_KEYBOARD_LL = 13 +WM_MOUSEMOVE = 512 +WM_LBUTTONDOWN = 513 +WM_RBUTTONDOWN = 516 +WM_MBUTTONDOWN = 519 +WM_XBUTTONDOWN = 523 +WM_LBUTTONUP = 514 +WM_RBUTTONUP = 517 +WM_MBUTTONUP = 520 +WM_XBUTTONUP = 524 +WM_LBUTTONDBLCLK = 515 +WM_RBUTTONDBLCLK = 518 +WM_MBUTTONDBLCLK = 521 +WM_MOUSEWHEEL = 522 +WM_KEYDOWN = 256 +WM_KEYUP = 257 +WM_SYSKEYDOWN = 260 +WM_SYSKEYUP = 261 +[Logger Logs] +=============== +AllLogsLock = O +LogCounter = Concurrent.ConcurrentDictionary`2[System.String,32] +--_tables = Concurrent.ConcurrentDictionary`2+Tables[System.String,32] +----_comparer = Generic.NonRandomizedStringEqualityComparer+OrdinalComparer +----_buckets = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,32][] +------System.Collections.Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Int32][] = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,32][]: N/A +----_fastModBucketsMultiplier = 498560650640798693 +----_locks = O[] +------System.Object[] = O[]: N/A +----_countPerLock = 32[] +------[0] = 0 +------[1] = 0 +------[2] = 0 +------[3] = 0 +------[4] = 0 +------[5] = 0 +------[6] = 0 +------[7] = 0 +------[8] = 0 +------[9] = 0 +------[10] = 0 +------[11] = 0 +------[12] = 0 +------[13] = 0 +------[14] = 0 +------[15] = 0 +--_budget = 2 +--_growLockArray = True +--_comparerIsDefaultForClasses = False +allLogsIndex = 0 +lastHour = 0 +exceptionCount = 0 +lastPackageSent = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +lastPackageReceived = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +MAX_LOG = 10000 +MaxLogExceptionPerHour = 1000 +HeaderSENT = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13} +HeaderRECEIVED = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15} diff --git a/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.original.txt b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.original.txt new file mode 100644 index 0000000000..04346ea04a --- /dev/null +++ b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/Logger.PrivateDump.original.txt @@ -0,0 +1,405 @@ +[Other Logs] +=============== + = MouseWithoutBorders.Common +lastClipboardEventTime = 0 +clipboardCopiedTime = 0 +Comma = System.Char[] +--System.Char[] = System.Char[]: N/A +Star = System.Char[] +--System.Char[] = System.Char[]: N/A +NullSeparator = System.Char[] +--System.Char[] = System.Char[]: N/A +k__BackingField = NONE +k__BackingField = 0 +k__BackingField = False +lastClipboardObject = +k__BackingField = False +ClipboardThreadOldLock = O +screenWidth = 0 +screenHeight = 0 +lastX = 0 +lastY = 0 +mainFormVisible = True +runOnLogonDesktop = False +runOnScrSaverDesktop = False +toggleIconsIndex = 0 +EvSwitch = EventWaitHandle +lastPos = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +switchCount = 0 +lastReconnectByHotKeyTime = 0 +tcpPort = 0 +secondOpenSocketTry = False +binaryName = MM +k__BackingField = 0 +k__BackingField = False +k__BackingField = False +socketMutexBalance = 0 +k__BackingField = False +k__BackingField = 0 +k__BackingField = 0 +InputSimulationLock = O +lastSendNextMachine = 0 +lastInputEventCount = 0 +lastRealInputEventCount = 0 +minSendTime = 9223372036854775807 +avgSendTime = 0 +maxSendTime = 0 +totalSendCount = 0 +totalSendTime = 0 +isDragging = False +dragDropStep05ExCalledByIpc = 0 +isDropping = False +dragMachine = NONE +k__BackingField = False +magicNumber = 0 +ran = System.Random +--_impl = System.Random+XoshiroImpl +----_s0 = 7284351989338469498 +----_s1 = 15479097190878625043 +----_s2 = 10963166711904013490 +----_s3 = 8600427501468926680 +--k__BackingField = System.Random+ThreadSafeRandom +InitialIV = 99999999999999999999 +k__BackingField = False +k__BackingField = False +LegalKeyDictionary = Concurrent.ConcurrentDictionary`2[System.String,System.Byte[]] +--_tables = Concurrent.ConcurrentDictionary`2+Tables[System.String,System.Byte[]] +----_comparer = Generic.NonRandomizedStringEqualityComparer+OrdinalIgnoreCaseComparer +----_buckets = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][] +------System.Collections.Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][] = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Byte[]][]: N/A +----_fastModBucketsMultiplier = 498560650640798693 +----_locks = O[] +------System.Object[] = O[]: N/A +----_countPerLock = 32[] +------[0] = 0 +------[1] = 0 +------[2] = 0 +------[3] = 0 +------[4] = 0 +------[5] = 0 +------[6] = 0 +------[7] = 0 +------[8] = 0 +------[9] = 0 +------[10] = 0 +------[11] = 0 +------[12] = 0 +------[13] = 0 +------[14] = 0 +------[15] = 0 +--_budget = 2 +--_growLockArray = True +--_comparerIsDefaultForClasses = False +KeybdPackage = MouseWithoutBorders.DATA +--Type = 0 +--Id = 0 +--Src = NONE +--Des = NONE +--DateTime = 0 +--Kd = MouseWithoutBorders.KEYBDDATA +--Md = MouseWithoutBorders.MOUSEDATA +--Machine1 = NONE +--Machine2 = NONE +--Machine3 = NONE +--Machine4 = NONE +--PostAction = Other +--machineNameP1 = 0 +--machineNameP2 = 0 +--machineNameP3 = 0 +--machineNameP4 = 0 +MousePackage = MouseWithoutBorders.DATA +--Type = 0 +--Id = 0 +--Src = NONE +--Des = NONE +--DateTime = 0 +--Kd = MouseWithoutBorders.KEYBDDATA +--Md = MouseWithoutBorders.MOUSEDATA +--Machine1 = NONE +--Machine2 = NONE +--Machine3 = NONE +--Machine4 = NONE +--PostAction = Other +--machineNameP1 = 0 +--machineNameP2 = 0 +--machineNameP3 = 0 +--machineNameP4 = 0 +inputEventCount = 0 +invalidPackageCount = 0 +MOVE_MOUSE_RELATIVE = 100000 +XY_BY_PIXEL = 300000 +k__BackingField = 0 +actualLastPos = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +myLastX = 0 +myLastY = 0 +signalHelperToExit = False +signalWatchDogToExit = False +WndProcCounter = 0 +initDone = False +REOPEN_WHEN_WSAECONNRESET = -10054 +REOPEN_WHEN_HOTKEY = -10055 +PleaseReopenSocket = 0 +ReopenSocketDueToReadError = False +k__BackingField = 26/09/2024 20:35:51 +--_dateData = 5250315815941007823 +--MinValue = 01/01/0001 00:00:00 +--MaxValue = 31/12/9999 23:59:59 +--UnixEpoch = 01/01/1970 00:00:00 +lastReleaseAllKeysCall = 0 +AllLogsLock = O +LogCounter = Concurrent.ConcurrentDictionary`2[System.String,32] +--_tables = Concurrent.ConcurrentDictionary`2+Tables[System.String,32] +----_comparer = Generic.NonRandomizedStringEqualityComparer+OrdinalComparer +----_buckets = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,32][] +------System.Collections.Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,System.Int32][] = Concurrent.ConcurrentDictionary`2+VolatileNode[System.String,32][]: N/A +----_fastModBucketsMultiplier = 498560650640798693 +----_locks = O[] +------System.Object[] = O[]: N/A +----_countPerLock = 32[] +------[0] = 0 +------[1] = 0 +------[2] = 0 +------[3] = 0 +------[4] = 0 +------[5] = 0 +------[6] = 0 +------[7] = 0 +------[8] = 0 +------[9] = 0 +------[10] = 0 +------[11] = 0 +------[12] = 0 +------[13] = 0 +------[14] = 0 +------[15] = 0 +--_budget = 2 +--_growLockArray = True +--_comparerIsDefaultForClasses = False +RepeatedLogIndexSelection = 32[] +--[0] = 1 +--[1] = 3 +--[2] = 10 +--[3] = 50 +--[4] = 100 +allLogsIndex = 0 +lastHour = 0 +exceptionCount = 0 +p1 = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +p2 = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +McMatrixLock = O +desMachineID = NONE +DesMachineName = +newDesMachineID = NONE +newDesMachineIdEx = NONE +dropMachineID = NONE +lastJump = 63862983351362 +desktopBounds = MouseWithoutBorders.MyRectangle +--Left = 0 +--Top = 0 +--Right = 0 +--Bottom = 0 +primaryScreenBounds = MouseWithoutBorders.MyRectangle +--Left = 0 +--Top = 0 +--Right = 0 +--Bottom = 0 +SwitchLocation = MouseWithoutBorders.Class.MouseLocation +--k__BackingField = 0 +--k__BackingField = 0 +--k__BackingField = 0 +PackageSent = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +PackageReceived = MouseWithoutBorders.PackageMonitor +--Keyboard = 0 +--Mouse = 0 +--Heartbeat = 0 +--ByeBye = 0 +--Hello = 0 +--Matrix = 0 +--ClipboardText = 0 +--ClipboardImage = 0 +--Clipboard = 0 +--ClipboardDragDrop = 0 +--ClipboardDragDropEnd = 0 +--ClipboardAsk = 0 +--ExplorerDragDrop = 0 +--Nil = 0 +PackageID = 0 +QUEUE_SIZE = 50 +RecentProcessedPackageIDs = 32[] +--[0] = 0 +--[1] = 0 +--[2] = 0 +--[3] = 0 +--[4] = 0 +--[5] = 0 +--[6] = 0 +--[7] = 0 +--[8] = 0 +--[9] = 0 +--[10] = 0 +--[11] = 0 +--[12] = 0 +--[13] = 0 +--[14] = 0 +--[15] = 0 +--[16] = 0 +--[17] = 0 +--[18] = 0 +--[19] = 0 +--[20] = 0 +--[21] = 0 +--[22] = 0 +--[23] = 0 +--[24] = 0 +--[25] = 0 +--[26] = 0 +--[27] = 0 +--[28] = 0 +--[29] = 0 +--[30] = 0 +--[31] = 0 +--[32] = 0 +--[33] = 0 +--[34] = 0 +--[35] = 0 +--[36] = 0 +--[37] = 0 +--[38] = 0 +--[39] = 0 +--[40] = 0 +--[41] = 0 +--[42] = 0 +--[43] = 0 +--[44] = 0 +--[45] = 0 +--[46] = 0 +--[47] = 0 +--[48] = 0 +--[49] = 0 +recentProcessedPackageIndex = 0 +processedPackageCount = 0 +skippedPackageCount = 0 +k__BackingField = 0 +lastXY = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +shownErrMessage = False +lastStartServiceTime = 26/09/2024 20:35:51 +--_dateData = 5250315815941010854 +--MinValue = 01/01/0001 00:00:00 +--MaxValue = 31/12/9999 23:59:59 +--UnixEpoch = 01/01/1970 00:00:00 +SensitivePoints = Generic.List`1[Point] +--_items = Point[] +----System.Drawing.Point[] = Point[]: N/A +--_size = 0 +--_version = 0 +--s_emptyArray = Point[] +----System.Drawing.Point[] = Point[]: N/A +p = {X=0,Y=0} +--x = 0 +--y = 0 +--Empty = {X=0,Y=0} +k__BackingField = False +BIG_CLIPBOARD_DATA_TIMEOUT = 30000 +MAX_CLIPBOARD_DATA_SIZE_CAN_BE_SENT_INSTANTLY_TCP = 1048576 +MAX_CLIPBOARD_FILE_SIZE_CAN_BE_SENT = 104857600 +TEXT_HEADER_SIZE = 12 +DATA_SIZE = 48 +TEXT_TYPE_SEP = {4CFF57F7-BEDD-43d5-AE8F-27A61E886F2F} +TOGGLE_ICONS_SIZE = 4 +ICON_ONE = 0 +ICON_ALL = 1 +ICON_SMALL_CLIPBOARD = 2 +ICON_BIG_CLIPBOARD = 3 +ICON_ERROR = 4 +JUST_GOT_BACK_FROM_SCREEN_SAVER = 9999 +NETWORK_STREAM_BUF_SIZE = 1048576 +SymAlBlockSize = 16 +PW_LENGTH = 16 +HELPER_FORM_TEXT = Mouse without Borders Helper +HelperProcessName = PowerToys.MouseWithoutBordersHelper +MAX_LOG = 10000 +MaxLogExceptionPerHour = 1000 +HeaderSENT = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13} +HeaderRECEIVED = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15} +MAX_MACHINE = 4 +MAX_SOCKET = 8 +HEARTBEAT_TIMEOUT = 1500000 +SKIP_PIXELS = 1 +JUMP_PIXELS = 2 +PACKAGE_SIZE = 32 +PACKAGE_SIZE_EX = 64 +WP_PACKAGE_SIZE = 6 +KEYEVENTF_KEYDOWN = 1 +KEYEVENTF_KEYUP = 2 +WH_MOUSE = 7 +WH_KEYBOARD = 2 +WH_MOUSE_LL = 14 +WH_KEYBOARD_LL = 13 +WM_MOUSEMOVE = 512 +WM_LBUTTONDOWN = 513 +WM_RBUTTONDOWN = 516 +WM_MBUTTONDOWN = 519 +WM_XBUTTONDOWN = 523 +WM_LBUTTONUP = 514 +WM_RBUTTONUP = 517 +WM_MBUTTONUP = 520 +WM_XBUTTONUP = 524 +WM_LBUTTONDBLCLK = 515 +WM_RBUTTONDBLCLK = 518 +WM_MBUTTONDBLCLK = 521 +WM_MOUSEWHEEL = 522 +WM_KEYDOWN = 256 +WM_KEYUP = 257 +WM_SYSKEYDOWN = 260 +WM_SYSKEYUP = 261 \ No newline at end of file diff --git a/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/LoggerTests.cs b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/LoggerTests.cs new file mode 100644 index 0000000000..be960b9a9b --- /dev/null +++ b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/Core/LoggerTests.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Concurrent; +using System.Globalization; +using System.Reflection; +using System.Text; + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MouseWithoutBorders.Core; + +namespace MouseWithoutBorders.UnitTests.Core; + +public static class LoggerTests +{ + [TestClass] + public sealed class PrivateDumpTests + { + /* + [TestMethod] + public void PrivateDumpShouldGenerateExpectedOutput() + { + // this was used to create the contents of "Logger.PrivateDump.original.txt" + // when the "Core.Logger" class was "Common" in "Common.Log.cs" + + // PrivateDump throws an ArgumentNullException if this is null + Common.BinaryName = "MyBinary.dll"; + + // magic number from Settings.cs + var dumpObjectsLevel = 6; + + // copied from DumpObjects in Common.Log.cs + var sb = new StringBuilder(1000000); + var result = Common.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, dumpObjectsLevel, false); + var output = sb.ToString(); + } + */ + + [TestMethod] + [Ignore( + "This test relies on internal details of the dotnet platform and is sensitive to " + + "the specific version of dotnet being used. As a result it's likely to fail if the " + + "\"expected\" result was generated with a different version to the version used to " + + "run the test, so we're going to ignore it in the CI build process.")] + public void PrivateDumpShouldGenerateExpectedOutput() + { + static string NormalizeLog(string log) + { + var lines = log.Split("\r\n"); + + // some parts of the PrivateDump output are impossible to reproduce - + // e.g. random numbers, system timestamps, thread ids, etc, so we'll mask them + var maskPrefixes = new string[] + { + "----_s0 = ", + "----_s1 = ", + "----_s2 = ", + "----_s3 = ", + "k__BackingField = ", + "--_dateData = ", + "lastJump = ", + "lastStartServiceTime = ", + "InitialIV = ", + }; + for (var i = 0; i < lines.Length; i++) + { + foreach (var maskPrefix in maskPrefixes) + { + if (lines[i].StartsWith(maskPrefix, StringComparison.InvariantCulture)) + { + // replace the trailing text with "?" characters + lines[i] = string.Concat( + lines[i].AsSpan(0, maskPrefix.Length), + new string('?', 12)); + } + } + } + + // hide some of the internals of concurrent dictionary lock tables + // as the size can vary across machines + var removeLines = new string[] + { + "------[8] = 0", + "------[9] = 0", + "------[10] = 0", + "------[11] = 0", + "------[12] = 0", + "------[13] = 0", + "------[14] = 0", + "------[15] = 0", + }; + lines = lines.Where(line => !removeLines.Contains(line)).ToArray(); + + return string.Join("\r\n", lines); + } + + // PrivateDump throws an ArgumentNullException if this is null + Common.BinaryName = "MyBinary.dll"; + + // default magic number from Settings.cs + var settingsDumpObjectsLevel = 6; + + // get the expected test result from an embedded resource + var assembly = Assembly.GetExecutingAssembly(); + var resourceName = $"{typeof(LoggerTests).Namespace}.Logger.PrivateDump.expected.txt"; + using var stream = assembly.GetManifestResourceStream(resourceName) + ?? throw new InvalidOperationException(); + using var streamReader = new StreamReader(stream); + var expected = streamReader.ReadToEnd(); + + // copied from DumpObjects in Common.Log.cs + var sb = new StringBuilder(1000000); + _ = Logger.PrivateDump(sb, Logger.AllLogs, "[Program logs]\r\n===============\r\n", 0, settingsDumpObjectsLevel, false); + _ = Logger.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, settingsDumpObjectsLevel, false); + sb.AppendLine("[Logger Logs]\r\n==============="); + Logger.DumpType(sb, typeof(Logger), 0, settingsDumpObjectsLevel); + var actual = sb.ToString(); + + expected = NormalizeLog(expected); + actual = NormalizeLog(actual); + + // Azure DevOps truncates debug output which makes it hard to see where + // the expected and actual differ, so we need to write a custom error message + // so we can just focus on the differences between expected and actual + var expectedLines = expected.Split("\r\n"); + var actualLines = actual.Split("\r\n"); + for (var i = 0; i < Math.Min(expectedLines.Length, actualLines.Length); i++) + { + if (actualLines[i] != expectedLines[i]) + { + var message = new StringBuilder(); + message.AppendLine(CultureInfo.InvariantCulture, $"{nameof(actual)} and {nameof(expected)} differ at line {i}:"); + + message.AppendLine(); + message.AppendLine($"{nameof(actual)}:"); + for (var j = i; j < Math.Min(i + 5, actualLines.Length); j++) + { + message.AppendLine(CultureInfo.InvariantCulture, $"[{j}]: {actualLines[j]}:"); + } + + message.AppendLine(); + message.AppendLine($"{nameof(expected)}:"); + for (var j = i; j < Math.Min(i + 5, expectedLines.Length); j++) + { + message.AppendLine(CultureInfo.InvariantCulture, $"[{j}]: {expectedLines[j]}:"); + } + + var x = new ConcurrentDictionary(-1, 16); + + Assert.Fail(message.ToString()); + } + } + + // finally, throw an exception if the two don't match + // just in case the above doesn't spot a difference + // (e.g. different number of lines in the output) + Assert.AreEqual(expected, actual); + } + } +} diff --git a/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/MouseWithoutBorders.UnitTests.csproj b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/MouseWithoutBorders.UnitTests.csproj new file mode 100644 index 0000000000..ad95d818a1 --- /dev/null +++ b/src/modules/MouseWithoutBorders/MouseWithoutBorders.UnitTests/MouseWithoutBorders.UnitTests.csproj @@ -0,0 +1,30 @@ + + + + + + + enable + enable + Library + + + + + + + + + + + + + + + + + + + + + From 83997a560479785c762123a7dfc8cc26188f1d66 Mon Sep 17 00:00:00 2001 From: 8LWXpg <105704427+8LWXpg@users.noreply.github.com> Date: Sat, 19 Oct 2024 01:57:51 +0800 Subject: [PATCH 40/54] [PTRun][Docs] Add SSH to Third-Party plugins (#35183) Update thirdPartyRunPlugins.md --- doc/thirdPartyRunPlugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/thirdPartyRunPlugins.md b/doc/thirdPartyRunPlugins.md index 4f58b1bea5..ad9b417b39 100644 --- a/doc/thirdPartyRunPlugins.md +++ b/doc/thirdPartyRunPlugins.md @@ -57,3 +57,4 @@ Below are community created plugins that target a website or software. They are | [Spotify](https://github.com/waaverecords/PowerToys-Run-Spotify) | [waaverecords](https://github.com/waaverecords) | Search Spotify and control its player | | [PowerSearch for 1Password](https://github.com/KairuDeibisu/PowerToysRunPlugin1Password) | [KairuDeibisu](https://github.com/KairuDeibisu) | An unofficial plugin for searching 1Password for usernames and passwords | | [HackMD](https://github.com/8LWXpg/PowerToysRun-HackMD) | [8LWXpg](https://github.com/8LWXpg) | Open HackMD notes | +| [SSH](https://github.com/8LWXpg/PowerToysRun-SSH) | [8LWXpg](https://github.com/8LWXpg) | Connect to ssh clients | From 278424e9e9b757ac2fdfb4977b28b243ed76fc1d Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 18 Oct 2024 11:25:24 -0700 Subject: [PATCH 41/54] Trying to correct spelling error around having leading numeric value for user name (#35447) * Update expect.txt * Update names.txt --- .github/actions/spell-check/allow/names.txt | 2 ++ .github/actions/spell-check/expect.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/spell-check/allow/names.txt b/.github/actions/spell-check/allow/names.txt index 97638a1684..4e28ee7a17 100644 --- a/.github/actions/spell-check/allow/names.txt +++ b/.github/actions/spell-check/allow/names.txt @@ -28,6 +28,8 @@ videoconference # USERS +# 8LWXpg is user name but user folder causes a flag +LWXpg Adoumie Advaith alekhyareddy diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index eeb735f825..fa94dd6d7e 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -2,8 +2,6 @@ ## "PackagemanagerWrapper.cs" should be "PackageManagerWrapper.cs" ## NOTICE.MD > MOZILLA PUBLIC LICENSE v1.1 -# user name but user folder causes a flag -8LWXpg aaaa abcdefghjkmnpqrstuvxyz abgr From 3a6536ce543e8a38cbc971b067986a4d5bdb2f89 Mon Sep 17 00:00:00 2001 From: Christian Gaarden Gaardmark Date: Mon, 21 Oct 2024 03:38:25 -0700 Subject: [PATCH 42/54] [New+]Fix for bug when creating folders or files rhat contain Unicode characters (#35465) wstring all the way --- .../NewShellExtensionContextMenu/template_item.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/template_item.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/template_item.cpp index 3c863be18e..e644df5c85 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/template_item.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/template_item.cpp @@ -67,12 +67,12 @@ std::filesystem::path template_item::copy_object_to(const HWND window_handle, co { // SHFILEOPSTRUCT wants the from and to paths to be terminated with two NULLs, wchar_t double_terminated_path_from[MAX_PATH + 1] = { 0 }; - wcsncpy_s(double_terminated_path_from, this->path.c_str(), this->path.string().length()); - double_terminated_path_from[this->path.string().length() + 1] = 0; + wcsncpy_s(double_terminated_path_from, this->path.c_str(), this->path.wstring().length()); + double_terminated_path_from[this->path.wstring().length() + 1] = 0; wchar_t double_terminated_path_to[MAX_PATH + 1] = { 0 }; - wcsncpy_s(double_terminated_path_to, destination.c_str(), destination.string().length()); - double_terminated_path_to[destination.string().length() + 1] = 0; + wcsncpy_s(double_terminated_path_to, destination.c_str(), destination.wstring().length()); + double_terminated_path_to[destination.wstring().length() + 1] = 0; SHFILEOPSTRUCT file_operation_params = { 0 }; file_operation_params.wFunc = FO_COPY; From 5d2bb16e92ee8ba88660f2fdd47d479033f47cfb Mon Sep 17 00:00:00 2001 From: Christian Gaarden Gaardmark Date: Mon, 21 Oct 2024 03:51:14 -0700 Subject: [PATCH 43/54] [New+]When new folder name collides, create copy instead of creating inside existing (#35464) * Fixed target folder path when source is a folder --- .../NewShellExtensionContextMenu/new_utilities.h | 6 ++++++ .../shell_context_sub_menu_item.cpp | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/new_utilities.h b/src/modules/NewPlus/NewShellExtensionContextMenu/new_utilities.h index 55bafb8b56..7ae46635a8 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/new_utilities.h +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/new_utilities.h @@ -50,6 +50,12 @@ namespace newplus::utilities return false; } + inline bool is_directory(const std::filesystem::path path) + { + const auto entry = std::filesystem::directory_entry(path); + return entry.is_directory(); + } + inline bool wstring_same_when_comparing_ignore_case(std::wstring stringA, std::wstring stringB) { transform(stringA.begin(), stringA.end(), stringA.begin(), towupper); diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp index bdae885009..99378f468a 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp @@ -70,9 +70,13 @@ IFACEMETHODIMP shell_context_sub_menu_item::Invoke(_In_opt_ IShellItemArray*, _I // Determine initial filename std::filesystem::path source_fullpath = template_entry->path; - std::filesystem::path target_fullpath = std::wstring(target_path_name) - + L"\\" - + this->template_entry->get_target_filename(!utilities::get_newplus_setting_hide_starting_digits()); + std::filesystem::path target_fullpath = std::wstring(target_path_name); + + // Only append name to target if source is not a directory + if (!utilities::is_directory(target_fullpath)) + { + target_fullpath.append(this->template_entry->get_target_filename(!utilities::get_newplus_setting_hide_starting_digits())); + } // Copy file and determine final filename std::filesystem::path target_final_fullpath = this->template_entry->copy_object_to(GetActiveWindow(), target_fullpath); From db3c8e621e2822aa104b988797a9aec480902d3a Mon Sep 17 00:00:00 2001 From: PesBandi <127593627+PesBandi@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:42:11 +0200 Subject: [PATCH 44/54] [PTRun]Improve copying error handling on plugins (#35459) --- .../Main.cs | 11 +++++++---- .../Main.cs | 5 +++-- .../ResultHelper.cs | 6 ++++-- .../Components/ResultHelper.cs | 2 +- .../Properties/Resources.Designer.cs | 9 +++++++++ .../Properties/Resources.resx | 3 +++ 6 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs index bc4c00d7a7..727f6fbf83 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs @@ -14,6 +14,7 @@ using System.Windows.Input; using ManagedCommon; using Wox.Plugin; +using Wox.Plugin.Logger; namespace Community.PowerToys.Run.Plugin.UnitConverter { @@ -75,9 +76,10 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.CopyFormat, CultureInfo.CurrentCulture)); ret = true; } - catch (ExternalException) + catch (ExternalException ex) { - MessageBox.Show(Properties.Resources.copy_failed); + Log.Exception("Copy failed", ex, GetType()); + MessageBox.Show(ex.Message, Properties.Resources.copy_failed); } }); thread.SetApartmentState(ApartmentState.STA); @@ -107,9 +109,10 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter Clipboard.SetText(result.ConvertedValue.ToString(UnitConversionResult.CopyFormat, CultureInfo.CurrentCulture)); ret = true; } - catch (ExternalException) + catch (ExternalException ex) { - MessageBox.Show(Properties.Resources.copy_failed); + Log.Exception("Copy failed", ex, GetType()); + MessageBox.Show(ex.Message, Properties.Resources.copy_failed); } }); thread.SetApartmentState(ApartmentState.STA); diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Main.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Main.cs index 494229a456..72f390a4a5 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Main.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Main.cs @@ -184,9 +184,10 @@ namespace Community.PowerToys.Run.Plugin.ValueGenerator Clipboard.SetText(request.ResultToString()); ret = true; } - catch (ExternalException) + catch (ExternalException ex) { - MessageBox.Show(Properties.Resources.copy_failed); + Log.Exception("Copy failed", ex, GetType()); + MessageBox.Show(ex.Message, Properties.Resources.copy_failed); } }); thread.SetApartmentState(ApartmentState.STA); diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs index cfeabd0f92..9b32a6f1e3 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Windows; using Wox.Plugin; +using Wox.Plugin.Logger; namespace Microsoft.PowerToys.Run.Plugin.Calculator { @@ -51,9 +52,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator Clipboard.SetText(roundedResult?.ToString(culture)); ret = true; } - catch (ExternalException) + catch (ExternalException ex) { - MessageBox.Show(Properties.Resources.wox_plugin_calculator_copy_failed); + Log.Exception("Copy failed", ex, typeof(ResultHelper)); + MessageBox.Show(ex.Message, Properties.Resources.wox_plugin_calculator_copy_failed); } }); diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/ResultHelper.cs index 5809fefa5d..7ea0ed798c 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/ResultHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/ResultHelper.cs @@ -50,13 +50,13 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components { try { - Clipboard.Clear(); Clipboard.SetText(text); return true; } catch (Exception exception) { Log.Exception("Can't copy to clipboard", exception, typeof(ResultHelper)); + MessageBox.Show(exception.Message, Resources.Microsoft_plugin_timedate_copy_failed); return false; } } diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.Designer.cs index da32b13a6d..1ecd40721d 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.Designer.cs @@ -60,6 +60,15 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties { } } + /// + /// Looks up a localized string similar to Copy failed. + /// + internal static string Microsoft_plugin_timedate_copy_failed { + get { + return ResourceManager.GetString("Microsoft_plugin_timedate_copy_failed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Copy value (Ctrl+C). /// diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.resx index 3cc62b0bbd..de7f2a0be5 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Properties/Resources.resx @@ -121,6 +121,9 @@ Copy value (Ctrl+C) 'Ctrl+C' is a shortcut + + Copy failed + Date From dc7c7ef2b7dc73344b6064cd94e7d787f025c70e Mon Sep 17 00:00:00 2001 From: Michael Clayton Date: Mon, 21 Oct 2024 17:38:07 +0100 Subject: [PATCH 45/54] [MouseJump][CQ]Refactor "common" classes into a separate project (#34333) * [Mouse Jump] - moving common code to MouseJump.Common project - #25482 * [Mouse Jump] - fixing warnings in MouseJump.Common - #25482 * [MouseJump] - cherrypick 5653b4 - Exclude MouseJump Common tests from the checks # Conflicts: # src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj * [mOuSEjUMP] - cherry pick 61aab9 - Fix ci build issues # Conflicts: # src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj * [Mouse Jump] - remove project type guids - #25482 * [Mouse Jump] - simplify mousejump *.csproj files - #25482 * [Mouse Jump] - fixing broken tests - #25482 * [Mouse Jump] - fixing broken build - #25482 * [Mouse Jump] - editing MouseJump.Common.UnitTests.csproj - #25482 * [Mouse Jump] - editing MouseJump.Common.csproj (UseWindowsForms=true) - #25482 * [Mouse Jump] - fixing spellcheck - #25482 * [MouseJump] - enabled implicit usings - #25482 * [Mouse Jump] - re-add csproj attributes - #27511 * ci: Fix signing of Common dll --------- Co-authored-by: Clayton --- .pipelines/ESRPSigning_core.json | 1 + .pipelines/verifyDepsJsonLibraryVersions.ps1 | 2 +- Directory.Packages.props | 2 +- NOTICE.md | 2 +- PowerToys.sln | 45 ++++++++++++------ .../Helpers/DrawingHelperTests.cs | 35 +++++++------- .../Helpers/LayoutHelperTests.cs | 12 ++--- .../Helpers/MouseHelperTests.cs | 8 ++-- .../Helpers/_test-4grid-desktop.png | Bin .../Helpers/_test-4grid-expected.png | Bin .../Helpers/_test-win11-desktop.png | Bin .../Helpers/_test-win11-expected.png | Bin .../Models/Drawing/RectangleInfoTests.cs | 6 +-- .../Models/Drawing/SizeInfoTests.cs | 6 +-- .../MouseJump.Common.UnitTests.csproj | 44 +++++++++++++++++ .../Helpers/DrawingHelper.cs | 16 +++---- .../Helpers/LayoutHelper.cs | 18 +++---- .../Helpers/MouseHelper.cs | 19 ++++---- .../Helpers/ScreenHelper.cs | 22 ++++----- .../Helpers/StyleHelper.cs | 11 ++--- .../Imaging/DesktopImageRegionCopyService.cs | 13 ++--- .../Imaging/IImageRegionCopyService.cs | 8 ++-- .../Imaging/StaticImageRegionCopyService.cs | 9 ++-- .../Models/Drawing/BoxBounds.cs | 6 +-- .../Models/Drawing/PointInfo.cs | 5 +- .../Models/Drawing/RectangleInfo.cs | 9 ++-- .../Models/Drawing/ScreenInfo.cs | 10 ++-- .../Models/Drawing/SizeInfo.cs | 10 ++-- .../Models/Layout/PreviewLayout.cs | 9 ++-- .../Models/Styles/BackgroundStyle.cs | 4 +- .../Models/Styles/BorderStyle.cs | 4 +- .../Models/Styles/BoxStyle.cs | 4 +- .../Models/Styles/MarginStyle.cs | 2 +- .../Models/Styles/PaddingStyle.cs | 2 +- .../Models/Styles/PreviewStyle.cs | 6 +-- .../MouseJump.Common/MouseJump.Common.csproj | 24 ++++++++++ .../NativeMethods/Core/BOOL.cs | 2 +- .../NativeMethods/Core/CRECT.cs | 2 +- .../NativeMethods/Core/DWORD.cs | 2 +- .../NativeMethods/Core/HANDLE.cs | 4 +- .../NativeMethods/Core/HDC.cs | 4 +- .../NativeMethods/Core/HMONITOR.cs | 4 +- .../NativeMethods/Core/HWND.cs | 3 +- .../NativeMethods/Core/LONG.cs | 2 +- .../NativeMethods/Core/LPARAM.cs | 3 +- .../NativeMethods/Core/LPCRECT.cs | 3 +- .../NativeMethods/Core/LPPOINT.cs | 3 +- .../NativeMethods/Core/LPRECT.cs | 4 +- .../NativeMethods/Core/POINT.cs | 2 +- .../NativeMethods/Core/RECT.cs | 2 +- .../NativeMethods/Core/UINT.cs | 2 +- .../NativeMethods/Core/ULONG_PTR.cs | 4 +- .../NativeMethods/Core/WORD.cs | 2 +- .../Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs | 2 +- .../Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs | 2 +- .../Graphics/Gdi/Gdi32.SetStretchBltMode.cs | 4 +- .../Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs | 4 +- .../NativeMethods/Libraries.cs | 2 +- .../Gdi/User32.EnumDisplayMonitors.cs | 4 +- .../Graphics/Gdi/User32.GetMonitorInfoW.cs | 4 +- .../User32/Graphics/Gdi/User32.GetWindowDC.cs | 4 +- .../Graphics/Gdi/User32.LPMONITORINFO.cs | 3 +- .../Graphics/Gdi/User32.MONITORENUMPROC .cs | 4 +- .../User32/Graphics/Gdi/User32.MONITORINFO.cs | 4 +- .../Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs | 2 +- .../Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs | 2 +- .../Graphics/Gdi/User32.MonitorFromPoint .cs | 4 +- .../User32/Graphics/Gdi/User32.ReleaseDC.cs | 4 +- .../KeyboardAndMouse/User32.HARDWAREINPUT.cs | 4 +- .../UI/Input/KeyboardAndMouse/User32.INPUT.cs | 4 +- .../KeyboardAndMouse/User32.INPUT_TYPE.cs | 2 +- .../KeyboardAndMouse/User32.KEYBDINPUT.cs | 4 +- .../Input/KeyboardAndMouse/User32.LPINPUT.cs | 4 +- .../KeyboardAndMouse/User32.MOUSEINPUT.cs | 4 +- .../User32.MOUSE_EVENT_FLAGS.cs | 3 +- .../KeyboardAndMouse/User32.SendInput.cs | 4 +- .../User32.GetCursorPos.cs | 4 +- .../User32.GetDesktopWindow.cs | 4 +- .../User32.GetSystemMetrics.cs | 2 +- .../User32.SYSTEM_METRICS_INDEX.cs | 2 +- .../User32.SetCursorPos.cs | 4 +- .../Properties/AssemblyInfo.cs | 2 +- .../MouseJumpUI.UnitTests.csproj | 35 -------------- .../MouseJumpUI/Helpers/SettingsHelper.cs | 2 +- .../MouseJumpUI/MainForm.Designer.cs | 2 +- .../MouseUtils/MouseJumpUI/MainForm.cs | 10 ++-- .../MouseUtils/MouseJumpUI/MouseJumpUI.csproj | 22 ++++----- 87 files changed, 281 insertions(+), 308 deletions(-) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/DrawingHelperTests.cs (82%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/LayoutHelperTests.cs (98%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/MouseHelperTests.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/_test-4grid-desktop.png (100%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/_test-4grid-expected.png (100%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/_test-win11-desktop.png (100%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Helpers/_test-win11-expected.png (100%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Models/Drawing/RectangleInfoTests.cs (97%) rename src/modules/MouseUtils/{MouseJumpUI.UnitTests/Common => MouseJump.Common.UnitTests}/Models/Drawing/SizeInfoTests.cs (96%) create mode 100644 src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Helpers/DrawingHelper.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Helpers/LayoutHelper.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Helpers/MouseHelper.cs (90%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Helpers/ScreenHelper.cs (87%) rename src/modules/MouseUtils/{MouseJumpUI => MouseJump.Common}/Helpers/StyleHelper.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Imaging/DesktopImageRegionCopyService.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Imaging/IImageRegionCopyService.cs (84%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Imaging/StaticImageRegionCopyService.cs (85%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Drawing/BoxBounds.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Drawing/PointInfo.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Drawing/RectangleInfo.cs (98%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Drawing/ScreenInfo.cs (76%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Drawing/SizeInfo.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Layout/PreviewLayout.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/BackgroundStyle.cs (92%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/BorderStyle.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/BoxStyle.cs (97%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/MarginStyle.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/PaddingStyle.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/Models/Styles/PreviewStyle.cs (89%) create mode 100644 src/modules/MouseUtils/MouseJump.Common/MouseJump.Common.csproj rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/BOOL.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/CRECT.cs (97%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/DWORD.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/HANDLE.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/HDC.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/HMONITOR.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/HWND.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/LONG.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/LPARAM.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/LPCRECT.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/LPPOINT.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/LPRECT.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/POINT.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/RECT.cs (97%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/UINT.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/ULONG_PTR.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Core/WORD.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs (96%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs (90%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs (92%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/Libraries.cs (87%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs (89%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs (87%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs (91%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs (91%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs (92%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs (94%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs (93%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs (91%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs (89%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs (89%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs (95%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs (98%) rename src/modules/MouseUtils/{MouseJumpUI/Common => MouseJump.Common}/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs (91%) rename src/modules/MouseUtils/{MouseJumpUI => MouseJump.Common}/Properties/AssemblyInfo.cs (78%) delete mode 100644 src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index 57a22ffd57..b4ee89fcf0 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -166,6 +166,7 @@ "PowerToys.FindMyMouse.dll", "PowerToys.MouseHighlighter.dll", "PowerToys.MouseJump.dll", + "PowerToys.MouseJump.Common.dll", "PowerToys.MousePointerCrosshairs.dll", "PowerToys.MouseJumpUI.dll", "PowerToys.MouseJumpUI.exe", diff --git a/.pipelines/verifyDepsJsonLibraryVersions.ps1 b/.pipelines/verifyDepsJsonLibraryVersions.ps1 index 16ef379188..7d5fc02c10 100644 --- a/.pipelines/verifyDepsJsonLibraryVersions.ps1 +++ b/.pipelines/verifyDepsJsonLibraryVersions.ps1 @@ -15,7 +15,7 @@ Param( $referencedFileVersionsPerDll = @{} $totalFailures = 0 -Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZones* | ForEach-Object { +Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZones*,MouseJump.Common.UnitTests* | ForEach-Object { # Temporarily exclude FancyZones UI tests because of Appium.WebDriver dependencies $depsJsonFullFileName = $_.FullName $depsJsonFileName = $_.Name diff --git a/Directory.Packages.props b/Directory.Packages.props index e0797a6270..b46a4076b1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -69,7 +69,7 @@ - + diff --git a/NOTICE.md b/NOTICE.md index a8059397e5..515759722b 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1351,7 +1351,7 @@ EXHIBIT A -Mozilla Public License. - System.Data.OleDb 8.0.1 - System.Data.SqlClient 4.8.6 - System.Diagnostics.EventLog 8.0.1 -- System.Drawing.Common 8.0.6 +- System.Drawing.Common 8.0.7 - System.IO.Abstractions 17.2.3 - System.IO.Abstractions.TestingHelpers 17.2.3 - System.Management 8.0.0 diff --git a/PowerToys.sln b/PowerToys.sln index 1113ab5530..29744af75f 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -504,9 +504,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseWithoutBordersHelper", EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseJump", "src\modules\MouseUtils\MouseJump\MouseJump.vcxproj", "{8A08D663-4995-40E3-B42C-3F910625F284}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJumpUI", "src\modules\MouseUtils\MouseJumpUI\MouseJumpUI.csproj", "{D962A009-834F-4EEC-AABB-430DF8F98E39}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJump.Common", "src\modules\MouseUtils\MouseJump.Common\MouseJump.Common.csproj", "{923DF87C-CA99-4D1C-B1D2-959174E95BFA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJumpUI.UnitTests", "src\modules\MouseUtils\MouseJumpUI.UnitTests\MouseJumpUI.UnitTests.csproj", "{D9C5DE64-6849-4278-91AD-9660AECF2876}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJump.Common.UnitTests", "src\modules\MouseUtils\MouseJump.Common.UnitTests\MouseJump.Common.UnitTests.csproj", "{D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJumpUI", "src\modules\MouseUtils\MouseJumpUI\MouseJumpUI.csproj", "{D962A009-834F-4EEC-AABB-430DF8F98E39}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AdvancedPaste", "AdvancedPaste", "{9873BA05-4C41-4819-9283-CF45D795431B}" EndProject @@ -2252,18 +2254,6 @@ Global {D962A009-834F-4EEC-AABB-430DF8F98E39}.Release|x64.Build.0 = Release|x64 {D962A009-834F-4EEC-AABB-430DF8F98E39}.Release|x86.ActiveCfg = Release|x64 {D962A009-834F-4EEC-AABB-430DF8F98E39}.Release|x86.Build.0 = Release|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|ARM64.Build.0 = Debug|ARM64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|x64.ActiveCfg = Debug|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|x64.Build.0 = Debug|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|x86.ActiveCfg = Debug|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Debug|x86.Build.0 = Debug|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|ARM64.ActiveCfg = Release|ARM64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|ARM64.Build.0 = Release|ARM64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|x64.ActiveCfg = Release|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|x64.Build.0 = Release|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|x86.ActiveCfg = Release|x64 - {D9C5DE64-6849-4278-91AD-9660AECF2876}.Release|x86.Build.0 = Release|x64 {FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|ARM64.Build.0 = Debug|ARM64 {FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|x64.ActiveCfg = Debug|x64 @@ -2652,6 +2642,30 @@ Global {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.Build.0 = Release|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|ARM64.Build.0 = Debug|ARM64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|x64.ActiveCfg = Debug|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|x64.Build.0 = Debug|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|x86.ActiveCfg = Debug|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Debug|x86.Build.0 = Debug|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|ARM64.ActiveCfg = Release|ARM64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|ARM64.Build.0 = Release|ARM64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|x64.ActiveCfg = Release|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|x64.Build.0 = Release|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|x86.ActiveCfg = Release|x64 + {923DF87C-CA99-4D1C-B1D2-959174E95BFA}.Release|x86.Build.0 = Release|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|ARM64.Build.0 = Debug|ARM64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|x64.ActiveCfg = Debug|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|x64.Build.0 = Debug|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|x86.ActiveCfg = Debug|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Debug|x86.Build.0 = Debug|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|ARM64.ActiveCfg = Release|ARM64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|ARM64.Build.0 = Release|ARM64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|x64.ActiveCfg = Release|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|x64.Build.0 = Release|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|x86.ActiveCfg = Release|x64 + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77}.Release|x86.Build.0 = Release|x64 {B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|ARM64.ActiveCfg = Debug|ARM64 {B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|ARM64.Build.0 = Debug|ARM64 {B31FCC55-B5A4-4EA7-B414-2DCEAE6AF332}.Debug|x64.ActiveCfg = Debug|x64 @@ -2927,7 +2941,6 @@ Global {A663E672-B26D-4EC0-BEAB-FE2E424AC46F} = {B6C42F16-73EB-477E-8B0D-4E6CF6C20AAC} {8A08D663-4995-40E3-B42C-3F910625F284} = {322566EF-20DC-43A6-B9F8-616AF942579A} {D962A009-834F-4EEC-AABB-430DF8F98E39} = {322566EF-20DC-43A6-B9F8-616AF942579A} - {D9C5DE64-6849-4278-91AD-9660AECF2876} = {322566EF-20DC-43A6-B9F8-616AF942579A} {9873BA05-4C41-4819-9283-CF45D795431B} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {FC373B24-3293-453C-AAF5-CF2909DCEE6A} = {9873BA05-4C41-4819-9283-CF45D795431B} {9CE59ED5-7087-4353-88EB-788038A73CEC} = {1AFB6476-670D-4E80-A464-657E01DFF482} @@ -2966,6 +2979,8 @@ Global {8ACB33D9-C95B-47D4-8363-9731EE0930A0} = {CA716AE6-FE5C-40AC-BB8F-2C87912687AC} {CA716AE6-FE5C-40AC-BB8F-2C87912687AC} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {F055103B-F80B-4D0C-BF48-057C55620033} = {5A7818A8-109C-4E1C-850D-1A654E234B0E} + {923DF87C-CA99-4D1C-B1D2-959174E95BFA} = {322566EF-20DC-43A6-B9F8-616AF942579A} + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77} = {322566EF-20DC-43A6-B9F8-616AF942579A} {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {BE126CBB-AE12-406A-9837-A05ACFCA57A7} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} {14CB58B7-D280-4A7A-95DE-4B2DF14EA000} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/DrawingHelperTests.cs b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/DrawingHelperTests.cs similarity index 82% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/DrawingHelperTests.cs rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/DrawingHelperTests.cs index 1859d085b5..5ba0a0eef8 100644 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/DrawingHelperTests.cs +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/DrawingHelperTests.cs @@ -2,20 +2,15 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; -using MouseJumpUI.Common.Helpers; -using MouseJumpUI.Common.Imaging; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Styles; -using MouseJumpUI.Helpers; +using MouseJump.Common.Helpers; +using MouseJump.Common.Imaging; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Styles; -namespace MouseJumpUI.UnitTests.Common.Helpers; +namespace MouseJump.Common.UnitTests.Helpers; [TestClass] public static class DrawingHelperTests @@ -60,8 +55,8 @@ public static class DrawingHelperTests new(0, 500, 500, 500), }, activatedLocation: new(x: 50, y: 50), - desktopImageFilename: "Common/Helpers/_test-4grid-desktop.png", - expectedImageFilename: "Common/Helpers/_test-4grid-expected.png"), + desktopImageFilename: "_test-4grid-desktop.png", + expectedImageFilename: "_test-4grid-expected.png"), }; /* win 11 */ yield return new object[] @@ -74,8 +69,8 @@ public static class DrawingHelperTests new(0, 0, 5120, 1440), }, activatedLocation: new(x: 50, y: 50), - desktopImageFilename: "Common/Helpers/_test-win11-desktop.png", - expectedImageFilename: "Common/Helpers/_test-win11-expected.png"), + desktopImageFilename: "_test-win11-desktop.png", + expectedImageFilename: "_test-win11-expected.png"), }; } @@ -104,13 +99,19 @@ public static class DrawingHelperTests private static Bitmap LoadImageResource(string filename) { + // assume embedded resources are in the same source folder as this + // class, and the namespace hierarchy matches the folder structure. + // that way we can build resource names from the current namespace + var resourcePrefix = typeof(DrawingHelperTests).Namespace; + var resourceName = $"{resourcePrefix}.{filename}"; + var assembly = Assembly.GetExecutingAssembly(); - var assemblyName = new AssemblyName(assembly.FullName ?? throw new InvalidOperationException()); - var resourceName = $"Microsoft.{assemblyName.Name}.{filename.Replace("/", ".")}"; var resourceNames = assembly.GetManifestResourceNames(); if (!resourceNames.Contains(resourceName)) { - throw new InvalidOperationException($"Embedded resource '{resourceName}' does not exist."); + var message = $"Embedded resource '{resourceName}' does not exist. " + + "Valid resource names are: \r\n" + string.Join("\r\n", resourceNames); + throw new InvalidOperationException(message); } var stream = assembly.GetManifestResourceStream(resourceName) diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/LayoutHelperTests.cs b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/LayoutHelperTests.cs similarity index 98% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/LayoutHelperTests.cs rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/LayoutHelperTests.cs index 13141b9268..5bdd4af443 100644 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/LayoutHelperTests.cs +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/LayoutHelperTests.cs @@ -2,17 +2,15 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Drawing; using System.Text.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; -using MouseJumpUI.Common.Helpers; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Layout; -using MouseJumpUI.Common.Models.Styles; +using MouseJump.Common.Helpers; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Layout; +using MouseJump.Common.Models.Styles; -namespace MouseJumpUI.UnitTests.Common.Helpers; +namespace MouseJump.Common.UnitTests.Helpers; [TestClass] public static class LayoutHelperTests diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/MouseHelperTests.cs b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/MouseHelperTests.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/MouseHelperTests.cs rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/MouseHelperTests.cs index b7e3b8a99e..52870e8cc1 100644 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/MouseHelperTests.cs +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/MouseHelperTests.cs @@ -2,13 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; - using Microsoft.VisualStudio.TestTools.UnitTesting; -using MouseJumpUI.Common.Helpers; -using MouseJumpUI.Common.Models.Drawing; +using MouseJump.Common.Helpers; +using MouseJump.Common.Models.Drawing; -namespace MouseJumpUI.UnitTests.Common.Helpers; +namespace MouseJump.Common.UnitTests.Helpers; [TestClass] public static class MouseHelperTests diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-4grid-desktop.png b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-4grid-desktop.png similarity index 100% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-4grid-desktop.png rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-4grid-desktop.png diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-4grid-expected.png b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-4grid-expected.png similarity index 100% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-4grid-expected.png rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-4grid-expected.png diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-win11-desktop.png b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-win11-desktop.png similarity index 100% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-win11-desktop.png rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-win11-desktop.png diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-win11-expected.png b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-win11-expected.png similarity index 100% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Helpers/_test-win11-expected.png rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/_test-win11-expected.png diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/RectangleInfoTests.cs b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/RectangleInfoTests.cs similarity index 97% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/RectangleInfoTests.cs rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/RectangleInfoTests.cs index 87d3128e3b..d2d6aba81c 100644 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/RectangleInfoTests.cs +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/RectangleInfoTests.cs @@ -2,12 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; - using Microsoft.VisualStudio.TestTools.UnitTesting; -using MouseJumpUI.Common.Models.Drawing; +using MouseJump.Common.Models.Drawing; -namespace MouseJumpUI.UnitTests.Common.Models.Drawing; +namespace MouseJump.Common.UnitTests.Models.Drawing; [TestClass] public static class RectangleInfoTests diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/SizeInfoTests.cs b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/SizeInfoTests.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/SizeInfoTests.cs rename to src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/SizeInfoTests.cs index 150b15cdc1..e6c33e3d7a 100644 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/Common/Models/Drawing/SizeInfoTests.cs +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/SizeInfoTests.cs @@ -2,12 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; - using Microsoft.VisualStudio.TestTools.UnitTesting; -using MouseJumpUI.Common.Models.Drawing; +using MouseJump.Common.Models.Drawing; -namespace MouseJumpUI.UnitTests.Common.Models.Drawing; +namespace MouseJump.Common.UnitTests.Models.Drawing; [TestClass] public static class SizeInfoTests diff --git a/src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj b/src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj new file mode 100644 index 0000000000..c97b009bb6 --- /dev/null +++ b/src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj @@ -0,0 +1,44 @@ + + + + + + + {D5E42C63-57C5-4EF6-AECE-1E2FCA725B77} + PowerToys.MouseJump.Common.UnitTests + PowerToys.MouseJump.Common.UnitTests + PowerToys MouseJump.Common.UnitTests + Library + ..\..\..\..\$(Platform)\$(Configuration)\tests\MouseJump.Common.UnitTests\ + false + false + + enable + true + enable + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/DrawingHelper.cs b/src/modules/MouseUtils/MouseJump.Common/Helpers/DrawingHelper.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Helpers/DrawingHelper.cs rename to src/modules/MouseUtils/MouseJump.Common/Helpers/DrawingHelper.cs index 0f60adae06..278e07039f 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/DrawingHelper.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Helpers/DrawingHelper.cs @@ -2,22 +2,18 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; -using System.Linq; -using MouseJumpUI.Common.Imaging; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Layout; -using MouseJumpUI.Common.Models.Styles; +using MouseJump.Common.Imaging; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Layout; +using MouseJump.Common.Models.Styles; -namespace MouseJumpUI.Common.Helpers; +namespace MouseJump.Common.Helpers; -internal static class DrawingHelper +public static class DrawingHelper { public static Bitmap RenderPreview( PreviewLayout previewLayout, diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/LayoutHelper.cs b/src/modules/MouseUtils/MouseJump.Common/Helpers/LayoutHelper.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/Helpers/LayoutHelper.cs rename to src/modules/MouseUtils/MouseJump.Common/Helpers/LayoutHelper.cs index f83540d1c0..791d1f7ffb 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/LayoutHelper.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Helpers/LayoutHelper.cs @@ -2,17 +2,13 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Linq; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Layout; +using MouseJump.Common.Models.Styles; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Layout; -using MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Helpers; -namespace MouseJumpUI.Common.Helpers; - -internal static class LayoutHelper +public static class LayoutHelper { public static PreviewLayout GetPreviewLayout( PreviewStyle previewStyle, List screens, PointInfo activatedLocation) @@ -111,7 +107,7 @@ internal static class LayoutHelper /// A object that represents the bounds of the different areas of the box. /// Thrown when or is null. /// Thrown when any of the styles in is null. - internal static BoxBounds GetBoxBoundsFromContentBounds( + public static BoxBounds GetBoxBoundsFromContentBounds( RectangleInfo contentBounds, BoxStyle boxStyle) { @@ -139,7 +135,7 @@ internal static class LayoutHelper /// A object that represents the bounds of the different areas of the box. /// Thrown when or is null. /// Thrown when any of the styles in is null. - internal static BoxBounds GetBoxBoundsFromOuterBounds( + public static BoxBounds GetBoxBoundsFromOuterBounds( RectangleInfo outerBounds, BoxStyle boxStyle) { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/MouseHelper.cs b/src/modules/MouseUtils/MouseJump.Common/Helpers/MouseHelper.cs similarity index 90% rename from src/modules/MouseUtils/MouseJumpUI/Common/Helpers/MouseHelper.cs rename to src/modules/MouseUtils/MouseJump.Common/Helpers/MouseHelper.cs index 1c116bf2c0..9354958878 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/MouseHelper.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Helpers/MouseHelper.cs @@ -5,15 +5,14 @@ using System.ComponentModel; using System.Runtime.InteropServices; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.NativeMethods; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.NativeMethods; +using static MouseJump.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.User32; -using static MouseJumpUI.Common.NativeMethods.Core; -using static MouseJumpUI.Common.NativeMethods.User32; +namespace MouseJump.Common.Helpers; -namespace MouseJumpUI.Common.Helpers; - -internal static class MouseHelper +public static class MouseHelper { /// /// Calculates where to move the cursor to by projecting a point from @@ -24,7 +23,7 @@ internal static class MouseHelper /// or even negative if the primary monitor is not the at the top-left of the /// entire desktop rectangle, so results may contain negative coordinates. /// - internal static PointInfo GetJumpLocation(PointInfo previewLocation, SizeInfo previewSize, RectangleInfo desktopBounds) + public static PointInfo GetJumpLocation(PointInfo previewLocation, SizeInfo previewSize, RectangleInfo desktopBounds) { return previewLocation .Scale(previewSize.ScaleToFitRatio(desktopBounds.Size)) @@ -34,7 +33,7 @@ internal static class MouseHelper /// /// Get the current position of the cursor. /// - internal static PointInfo GetCursorPosition() + public static PointInfo GetCursorPosition() { var lpPoint = new LPPOINT(new POINT(0, 0)); var result = User32.GetCursorPos(lpPoint); @@ -57,7 +56,7 @@ internal static class MouseHelper /// /// See https://github.com/mikeclayton/FancyMouse/pull/3 /// - internal static void SetCursorPosition(PointInfo location) + public static void SetCursorPosition(PointInfo location) { // set the new cursor position *twice* - the cursor sometimes end up in // the wrong place if we try to cross the dead space between non-aligned diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/ScreenHelper.cs b/src/modules/MouseUtils/MouseJump.Common/Helpers/ScreenHelper.cs similarity index 87% rename from src/modules/MouseUtils/MouseJumpUI/Common/Helpers/ScreenHelper.cs rename to src/modules/MouseUtils/MouseJump.Common/Helpers/ScreenHelper.cs index 2cdc009867..a863b45bbe 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Helpers/ScreenHelper.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Helpers/ScreenHelper.cs @@ -2,26 +2,22 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.NativeMethods; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.NativeMethods; +using static MouseJump.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.User32; -using static MouseJumpUI.Common.NativeMethods.Core; -using static MouseJumpUI.Common.NativeMethods.User32; +namespace MouseJump.Common.Helpers; -namespace MouseJumpUI.Common.Helpers; - -internal static class ScreenHelper +public static class ScreenHelper { /// /// Duplicates functionality available in System.Windows.Forms.SystemInformation /// to reduce the dependency on WinForms /// - public static RectangleInfo GetVirtualScreen() + private static RectangleInfo GetVirtualScreen() { return new( User32.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_XVIRTUALSCREEN), @@ -30,7 +26,7 @@ internal static class ScreenHelper User32.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_CYVIRTUALSCREEN)); } - internal static IEnumerable GetAllScreens() + public static IEnumerable GetAllScreens() { // enumerate the monitors attached to the system var hMonitors = new List(); @@ -80,7 +76,7 @@ internal static class ScreenHelper } } - internal static ScreenInfo GetScreenFromPoint( + public static ScreenInfo GetScreenFromPoint( List screens, PointInfo pt) { diff --git a/src/modules/MouseUtils/MouseJumpUI/Helpers/StyleHelper.cs b/src/modules/MouseUtils/MouseJump.Common/Helpers/StyleHelper.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Helpers/StyleHelper.cs rename to src/modules/MouseUtils/MouseJump.Common/Helpers/StyleHelper.cs index c6a248f906..2f02ae507d 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Helpers/StyleHelper.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Helpers/StyleHelper.cs @@ -2,15 +2,12 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Styles; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Helpers; -namespace MouseJumpUI.Helpers; - -internal static class StyleHelper +public static class StyleHelper { /// /// Default v2 preview style diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/DesktopImageRegionCopyService.cs b/src/modules/MouseUtils/MouseJump.Common/Imaging/DesktopImageRegionCopyService.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/Imaging/DesktopImageRegionCopyService.cs rename to src/modules/MouseUtils/MouseJump.Common/Imaging/DesktopImageRegionCopyService.cs index 45b8251305..07ba85d09c 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/DesktopImageRegionCopyService.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Imaging/DesktopImageRegionCopyService.cs @@ -2,22 +2,19 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; -using System.Drawing; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.NativeMethods; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.NativeMethods; +using static MouseJump.Common.NativeMethods.Core; -using static MouseJumpUI.Common.NativeMethods.Core; - -namespace MouseJumpUI.Common.Imaging; +namespace MouseJump.Common.Imaging; /// /// Implements an IImageRegionCopyService that uses the current desktop window as the copy source. /// This is used during the main application runtime to generate preview images of the desktop. /// -internal sealed class DesktopImageRegionCopyService : IImageRegionCopyService +public sealed class DesktopImageRegionCopyService : IImageRegionCopyService { /// /// Copies the source region from the current desktop window diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/IImageRegionCopyService.cs b/src/modules/MouseUtils/MouseJump.Common/Imaging/IImageRegionCopyService.cs similarity index 84% rename from src/modules/MouseUtils/MouseJumpUI/Common/Imaging/IImageRegionCopyService.cs rename to src/modules/MouseUtils/MouseJump.Common/Imaging/IImageRegionCopyService.cs index 0b9e573446..c352510e6b 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/IImageRegionCopyService.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Imaging/IImageRegionCopyService.cs @@ -2,13 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Drawing; +using MouseJump.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Imaging; -namespace MouseJumpUI.Common.Imaging; - -internal interface IImageRegionCopyService +public interface IImageRegionCopyService { /// /// Copies the source region from the provider's source image (e.g. the interactive desktop, diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/StaticImageRegionCopyService.cs b/src/modules/MouseUtils/MouseJump.Common/Imaging/StaticImageRegionCopyService.cs similarity index 85% rename from src/modules/MouseUtils/MouseJumpUI/Common/Imaging/StaticImageRegionCopyService.cs rename to src/modules/MouseUtils/MouseJump.Common/Imaging/StaticImageRegionCopyService.cs index 313a5a0b86..6808ff09e6 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Imaging/StaticImageRegionCopyService.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Imaging/StaticImageRegionCopyService.cs @@ -2,18 +2,15 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; +using MouseJump.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Drawing; - -namespace MouseJumpUI.Common.Imaging; +namespace MouseJump.Common.Imaging; /// /// Implements an IImageRegionCopyService that uses the specified image as the copy source. /// This is used for testing the DrawingHelper rather than as part of the main application. /// -internal sealed class StaticImageRegionCopyService : IImageRegionCopyService +public sealed class StaticImageRegionCopyService : IImageRegionCopyService { public StaticImageRegionCopyService(Image sourceImage) { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/BoxBounds.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/BoxBounds.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/BoxBounds.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Drawing/BoxBounds.cs index 8b04ab9d28..0c2d81a196 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/BoxBounds.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/BoxBounds.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Models.Drawing; public sealed class BoxBounds { @@ -28,7 +26,7 @@ public sealed class BoxBounds */ - internal BoxBounds( + public BoxBounds( RectangleInfo outerBounds, RectangleInfo marginBounds, RectangleInfo borderBounds, diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/PointInfo.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/PointInfo.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/PointInfo.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Drawing/PointInfo.cs index 41ba60eec4..676fdb92c0 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/PointInfo.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/PointInfo.cs @@ -2,10 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; - -namespace MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Models.Drawing; /// /// Immutable version of a System.Drawing.Point object with some extra utility methods. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/RectangleInfo.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/RectangleInfo.cs similarity index 98% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/RectangleInfo.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Drawing/RectangleInfo.cs index 71db6b5018..e0f8c3b7ef 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/RectangleInfo.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/RectangleInfo.cs @@ -2,15 +2,12 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; using System.Text.Json.Serialization; -using MouseJumpUI.Common.Models.Styles; +using MouseJump.Common.Models.Styles; +using BorderStyle = MouseJump.Common.Models.Styles.BorderStyle; -using BorderStyle = MouseJumpUI.Common.Models.Styles.BorderStyle; - -namespace MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Models.Drawing; /// /// Immutable version of a System.Drawing.Rectangle object with some extra utility methods. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/ScreenInfo.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/ScreenInfo.cs similarity index 76% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/ScreenInfo.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Drawing/ScreenInfo.cs index a671be7cec..b1e9c9327a 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/ScreenInfo.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/ScreenInfo.cs @@ -2,19 +2,15 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -using static MouseJumpUI.Common.NativeMethods.Core; - -namespace MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Models.Drawing; /// /// Immutable version of a System.Windows.Forms.Screen object so we don't need to /// take a dependency on WinForms just for screen info. /// -internal sealed class ScreenInfo +public sealed class ScreenInfo { - internal ScreenInfo(HMONITOR handle, bool primary, RectangleInfo displayArea, RectangleInfo workingArea) + public ScreenInfo(int handle, bool primary, RectangleInfo displayArea, RectangleInfo workingArea) { this.Handle = handle; this.Primary = primary; diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/SizeInfo.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/SizeInfo.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/SizeInfo.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Drawing/SizeInfo.cs index 3216e4d367..ffb0b4de10 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/SizeInfo.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Drawing/SizeInfo.cs @@ -2,14 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; +using MouseJump.Common.Models.Styles; +using BorderStyle = MouseJump.Common.Models.Styles.BorderStyle; -using MouseJumpUI.Common.Models.Styles; - -using BorderStyle = MouseJumpUI.Common.Models.Styles.BorderStyle; - -namespace MouseJumpUI.Common.Models.Drawing; +namespace MouseJump.Common.Models.Drawing; /// /// Immutable version of a System.Drawing.Size object with some extra utility methods. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Layout/PreviewLayout.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Layout/PreviewLayout.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Layout/PreviewLayout.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Layout/PreviewLayout.cs index e09a45e79f..342389d45d 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Layout/PreviewLayout.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Layout/PreviewLayout.cs @@ -2,15 +2,12 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Styles; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Styles; -namespace MouseJumpUI.Common.Models.Layout; +namespace MouseJump.Common.Models.Layout; public sealed class PreviewLayout { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BackgroundStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BackgroundStyle.cs similarity index 92% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BackgroundStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/BackgroundStyle.cs index 332a55fcbe..1d6609a676 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BackgroundStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BackgroundStyle.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Drawing; - -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; /// /// Represents the background fill style for a drawing object. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BorderStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BorderStyle.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BorderStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/BorderStyle.cs index 3c5b870e60..a8773b535d 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BorderStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BorderStyle.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Drawing; - -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; /// /// Represents the border style for a drawing object. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BoxStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BoxStyle.cs similarity index 97% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BoxStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/BoxStyle.cs index dac908b05c..55e27c3b9f 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/BoxStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/BoxStyle.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; /// /// Represents the styles to apply to a simple box-layout based drawing object. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/MarginStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/MarginStyle.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/MarginStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/MarginStyle.cs index 6dce63f57b..b0a369dfe7 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/MarginStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/MarginStyle.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; /// /// Represents the margin style for a drawing object. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PaddingStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/PaddingStyle.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PaddingStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/PaddingStyle.cs index 6ac7bc6b11..d4b0c82b40 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PaddingStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/PaddingStyle.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; /// /// Represents the margin style for a drawing object. diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PreviewStyle.cs b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/PreviewStyle.cs similarity index 89% rename from src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PreviewStyle.cs rename to src/modules/MouseUtils/MouseJump.Common/Models/Styles/PreviewStyle.cs index 8b2405d59a..2ca2b1bc28 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/Models/Styles/PreviewStyle.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Models/Styles/PreviewStyle.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +using MouseJump.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Drawing; - -namespace MouseJumpUI.Common.Models.Styles; +namespace MouseJump.Common.Models.Styles; public sealed class PreviewStyle { diff --git a/src/modules/MouseUtils/MouseJump.Common/MouseJump.Common.csproj b/src/modules/MouseUtils/MouseJump.Common/MouseJump.Common.csproj new file mode 100644 index 0000000000..4b56443fa7 --- /dev/null +++ b/src/modules/MouseUtils/MouseJump.Common/MouseJump.Common.csproj @@ -0,0 +1,24 @@ + + + + + + + {923DF87C-CA99-4D1C-B1D2-959174E95BFA} + PowerToys.MouseJump.Common + PowerToys.MouseJump.Common + PowerToys MouseJump.Common + Library + ..\..\..\..\$(Platform)\$(Configuration) + false + false + + PerMonitorV2 + true + enable + true + enable + + + + diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/BOOL.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/BOOL.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/BOOL.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/BOOL.cs index ec8849d952..293ae0a226 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/BOOL.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/BOOL.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/CRECT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/CRECT.cs similarity index 97% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/CRECT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/CRECT.cs index 3b02b3bf5e..03e3d8efd1 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/CRECT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/CRECT.cs @@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/DWORD.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/DWORD.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/DWORD.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/DWORD.cs index 900b5bfb77..5a7ae72697 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/DWORD.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/DWORD.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HANDLE.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HANDLE.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HANDLE.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HANDLE.cs index c89132e0be..d32f6f8e3c 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HANDLE.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HANDLE.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HDC.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HDC.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HDC.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HDC.cs index 0996030b01..038ae8df2b 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HDC.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HDC.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HMONITOR.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HMONITOR.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HMONITOR.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HMONITOR.cs index 5baa77bfc5..9344208770 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HMONITOR.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HMONITOR.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HWND.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HWND.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HWND.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HWND.cs index e421a1ca91..715f922b66 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/HWND.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HWND.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LONG.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LONG.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LONG.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LONG.cs index 7fe4b6cb99..3ac457eb44 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LONG.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LONG.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPARAM.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPARAM.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPARAM.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPARAM.cs index f214e53a6f..f93e089b12 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPARAM.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPARAM.cs @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPCRECT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPCRECT.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPCRECT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPCRECT.cs index c23dbbfb85..5cc6d9f3c7 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPCRECT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPCRECT.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPPOINT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPPOINT.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPPOINT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPPOINT.cs index c68d8b336b..725cc154d1 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPPOINT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPPOINT.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPRECT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPRECT.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPRECT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPRECT.cs index 66f22da181..31ba69fd4c 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/LPRECT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPRECT.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; + using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/POINT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/POINT.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/POINT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/POINT.cs index 6077174ce6..a843059b99 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/POINT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/POINT.cs @@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/RECT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/RECT.cs similarity index 97% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/RECT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/RECT.cs index 084616cc77..04df9a98c8 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/RECT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/RECT.cs @@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/UINT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/UINT.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/UINT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/UINT.cs index d2ce9a2e51..f178f8f866 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/UINT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/UINT.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/ULONG_PTR.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/ULONG_PTR.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/ULONG_PTR.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/ULONG_PTR.cs index ed26092cb1..b8a8764c3a 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/ULONG_PTR.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/ULONG_PTR.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/WORD.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/WORD.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/WORD.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/WORD.cs index 987b532f29..8ef05dd17a 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Core/WORD.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/WORD.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Core { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs similarity index 96% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs index 1cb5261967..4f4a9673c4 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Gdi32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs index f1417941d3..0b25a3d565 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Gdi32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs similarity index 90% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs index e2aa26b8dd..95c71137a5 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Gdi32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs similarity index 92% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs index 4c74de99a4..f6f9243815 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class Gdi32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Libraries.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Libraries.cs similarity index 87% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Libraries.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/Libraries.cs index e648f9b01b..970183cab0 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/Libraries.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/Libraries.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static class Libraries { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs index 2572e40881..7ebbea2dfa 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs similarity index 89% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs index f6680a3a27..cd328f76cc 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs index ce5cf1afb5..229dedcdf1 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs index 3896962d71..d70342fa0b 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs similarity index 87% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs index 169bf3e567..017f8a2d72 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs @@ -2,9 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs index 97af859180..06c5a07b7e 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs @@ -5,9 +5,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs index c566193874..61f15c2944 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; [SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")] internal static partial class User32 diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs index 8bfa14eb55..c7bbe4033b 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; [SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")] internal static partial class User32 diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs similarity index 91% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs index a511631f1e..04eb36a312 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs similarity index 91% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs index 20e1ded98f..6fa39e023d 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs similarity index 92% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs index 2959b393e3..84b43227f7 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs @@ -5,9 +5,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs index 9a4b1605bd..543e7d8e18 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs @@ -5,9 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; - -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs similarity index 94% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs index b065fdfc43..8fd5a8ad20 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; [SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")] internal static partial class User32 diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs index c421841e91..052836d5ef 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs @@ -5,9 +5,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs index e803fe3d85..5730ff9dc5 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs similarity index 93% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs index edc3916ba5..be243b778f 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs @@ -5,9 +5,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs index 6bfe6d3bbe..08b0780327 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; [SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")] internal static partial class User32 diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs similarity index 91% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs index b0399d8848..74eb5ac9fb 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs similarity index 89% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs index 80af7f7461..1d84e17e2a 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs similarity index 89% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs index bd2e870b87..8984e9639c 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs similarity index 95% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs index 0865d5af3d..dafa5daadd 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs similarity index 98% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs index 5891c53551..8a714ad052 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; [SuppressMessage("SA1310", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Names match Win32 api")] internal static partial class User32 diff --git a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs similarity index 91% rename from src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs rename to src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs index 6420cd8f5b..b3bb04fef9 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs +++ b/src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs @@ -4,9 +4,9 @@ using System.Runtime.InteropServices; -using static MouseJumpUI.Common.NativeMethods.Core; +using static MouseJump.Common.NativeMethods.Core; -namespace MouseJumpUI.Common.NativeMethods; +namespace MouseJump.Common.NativeMethods; internal static partial class User32 { diff --git a/src/modules/MouseUtils/MouseJumpUI/Properties/AssemblyInfo.cs b/src/modules/MouseUtils/MouseJump.Common/Properties/AssemblyInfo.cs similarity index 78% rename from src/modules/MouseUtils/MouseJumpUI/Properties/AssemblyInfo.cs rename to src/modules/MouseUtils/MouseJump.Common/Properties/AssemblyInfo.cs index b44c65eead..e69edb9c61 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Properties/AssemblyInfo.cs +++ b/src/modules/MouseUtils/MouseJump.Common/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("MouseJumpUI.UnitTests")] +[assembly: InternalsVisibleTo("MouseJump.Common.UnitTests")] diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj b/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj deleted file mode 100644 index 67720c8bcd..0000000000 --- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - {D9C5DE64-6849-4278-91AD-9660AECF2876} - Microsoft.MouseJumpUI.UnitTests - false - enable - Library - - - - ..\..\..\..\$(Platform)\$(Configuration)\tests\MouseJumpUI.UnitTests\ - - - - - - - runtime - - - - - - - - - - - - - - diff --git a/src/modules/MouseUtils/MouseJumpUI/Helpers/SettingsHelper.cs b/src/modules/MouseUtils/MouseJumpUI/Helpers/SettingsHelper.cs index cade054f69..cfd10fbd78 100644 --- a/src/modules/MouseUtils/MouseJumpUI/Helpers/SettingsHelper.cs +++ b/src/modules/MouseUtils/MouseJumpUI/Helpers/SettingsHelper.cs @@ -13,7 +13,7 @@ using Microsoft.PowerToys.Settings.UI.Library.Utilities; namespace MouseJumpUI.Helpers; -internal class SettingsHelper +internal sealed class SettingsHelper { public SettingsHelper() { diff --git a/src/modules/MouseUtils/MouseJumpUI/MainForm.Designer.cs b/src/modules/MouseUtils/MouseJumpUI/MainForm.Designer.cs index 6300590e73..efc4310665 100644 --- a/src/modules/MouseUtils/MouseJumpUI/MainForm.Designer.cs +++ b/src/modules/MouseUtils/MouseJumpUI/MainForm.Designer.cs @@ -6,7 +6,7 @@ using System.Windows.Forms; namespace MouseJumpUI; -partial class MainForm +internal sealed partial class MainForm { /// diff --git a/src/modules/MouseUtils/MouseJumpUI/MainForm.cs b/src/modules/MouseUtils/MouseJumpUI/MainForm.cs index 1b8b311d89..88ee061c4e 100644 --- a/src/modules/MouseUtils/MouseJumpUI/MainForm.cs +++ b/src/modules/MouseUtils/MouseJumpUI/MainForm.cs @@ -9,15 +9,15 @@ using System.Linq; using System.Windows.Forms; using ManagedCommon; -using MouseJumpUI.Common.Helpers; -using MouseJumpUI.Common.Imaging; -using MouseJumpUI.Common.Models.Drawing; -using MouseJumpUI.Common.Models.Layout; +using MouseJump.Common.Helpers; +using MouseJump.Common.Imaging; +using MouseJump.Common.Models.Drawing; +using MouseJump.Common.Models.Layout; using MouseJumpUI.Helpers; namespace MouseJumpUI; -internal partial class MainForm : Form +internal sealed partial class MainForm : Form { public MainForm(SettingsHelper settingsHelper) { diff --git a/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj b/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj index 1333ead0c5..4ffd69bee6 100644 --- a/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj +++ b/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj @@ -4,26 +4,24 @@ + + PowerToys.MouseJumpUI PowerToys.MouseJumpUI PowerToys MouseJumpUI + WinExe ..\..\..\..\$(Platform)\$(Configuration) false false - true - true - MouseJumpUI.Program + + PerMonitorV2 true enable - PerMonitorV2 - {D962A009-834F-4EEC-AABB-430DF8F98E39} - WinExe - MouseJumpUI - PowerToys.MouseJumpUI - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - true + true + disable + - + PowerToys.GPOWrapper $(OutDir) @@ -36,5 +34,7 @@ + + \ No newline at end of file From e88b22937e81e08a9ac3592a5e04ed5a094ff058 Mon Sep 17 00:00:00 2001 From: Sergey Chernyaev Date: Tue, 22 Oct 2024 10:35:49 +0200 Subject: [PATCH 46/54] [QuickAccent]Add support for Serbian Cyrillic (#35500) * **Languages.cs** - Add `GetDefaultLetterKeySRCyrillic` method for Serbian Cyrillic letters. - Add `SR_CYRL` entry to `Language` enum. - Update `GetDefaultLetterKey` method to include `Language.SR_CYRL`. * **PowerAccentPage.xaml** - Add `ComboBoxItem` for Serbian Cyrillic in `SelectedLanguage` `ComboBox`. * **Resources.resw** - Add entry for Serbian Cyrillic. * **PowerAccentViewModel.cs** - Add `SR_CYRL` to the list of supported languages. --- .../poweraccent/PowerAccent.Core/Languages.cs | 16 ++++++++++++++++ .../SettingsXAML/Views/PowerAccentPage.xaml | 3 ++- .../Settings.UI/Strings/en-us/Resources.resw | 5 ++++- .../ViewModels/PowerAccentViewModel.cs | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index d72a7bf486..d02afd2c85 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -47,6 +47,7 @@ namespace PowerAccent.Core SL, SP, SR, + SR_CYRL, SV, TK, } @@ -94,6 +95,7 @@ namespace PowerAccent.Core Language.SL => GetDefaultLetterKeySL(letter), // Slovenian Language.SP => GetDefaultLetterKeySP(letter), // Spain Language.SR => GetDefaultLetterKeySR(letter), // Serbian + Language.SR_CYRL => GetDefaultLetterKeySRCyrillic(letter), // Serbian Cyrillic Language.SV => GetDefaultLetterKeySV(letter), // Swedish Language.TK => GetDefaultLetterKeyTK(letter), // Turkish _ => throw new ArgumentException("The language {0} is not known in this context", lang.ToString()), @@ -144,6 +146,7 @@ namespace PowerAccent.Core .Union(GetDefaultLetterKeySL(letter)) .Union(GetDefaultLetterKeySP(letter)) .Union(GetDefaultLetterKeySR(letter)) + .Union(GetDefaultLetterKeySRCyrillic(letter)) .Union(GetDefaultLetterKeySV(letter)) .Union(GetDefaultLetterKeyTK(letter)) .Union(GetDefaultLetterKeyAllLanguagesOnly(letter)) @@ -771,6 +774,19 @@ namespace PowerAccent.Core }; } + // Serbian Cyrillic + private static string[] GetDefaultLetterKeySRCyrillic(LetterKey letter) + { + return letter switch + { + LetterKey.VK_D => new[] { "ђ", "џ" }, + LetterKey.VK_L => new[] { "љ" }, + LetterKey.VK_N => new[] { "њ" }, + LetterKey.VK_C => new[] { "ћ" }, + _ => Array.Empty(), + }; + } + // Macedonian private static string[] GetDefaultLetterKeyMK(LetterKey letter) { diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml index 0c75c60c92..77c96b15f6 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml @@ -1,4 +1,4 @@ - + diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index ed662f87d0..781a89ae88 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -1,4 +1,4 @@ - + + @@ -57,7 +59,7 @@ - + diff --git a/NOTICE.md b/NOTICE.md index 515759722b..f90b982505 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1317,6 +1317,7 @@ EXHIBIT A -Mozilla Public License. - LazyCache 2.4.0 - Mages 2.0.2 - Markdig.Signed 0.34.0 +- MessagePack 2.5.187 - Microsoft.CodeAnalysis.NetAnalyzers 8.0.0 - Microsoft.Data.Sqlite 8.0.7 - Microsoft.Extensions.DependencyInjection 8.0.0 @@ -1342,7 +1343,7 @@ EXHIBIT A -Mozilla Public License. - ReverseMarkdown 4.1.0 - ScipBe.Common.Office.OneNote 3.0.1 - SharpCompress 0.37.2 -- StreamJsonRpc 2.14.24 +- StreamJsonRpc 2.19.27 - StyleCop.Analyzers 1.2.0-beta.556 - System.CodeDom 8.0.0 - System.CommandLine 2.0.0-beta4.22272.1 diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.csproj b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.csproj index ca34cf03ff..c8ea965a4d 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.csproj +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.csproj @@ -54,12 +54,15 @@ + + + + - diff --git a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj index 9a4e8acb82..705340f39f 100644 --- a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj +++ b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj @@ -57,6 +57,8 @@ + + diff --git a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj index 5e90e1c6e8..8bb21597d5 100644 --- a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj +++ b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj @@ -208,6 +208,8 @@ + + diff --git a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj index 63a0f43823..3925634618 100644 --- a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj +++ b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj @@ -61,6 +61,8 @@ + + diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj index 179fd04286..d5f72b1c43 100644 --- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj +++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj @@ -56,6 +56,8 @@ + + From 04795c6d3a4f26c0de4c5fc319fc1c34e79355e1 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Wed, 23 Oct 2024 08:52:47 +0100 Subject: [PATCH 48/54] [ci]Fail when a step in multiline powershell fails (#35520) --- .pipelines/v2/templates/job-build-project.yml | 8 +++++++- .pipelines/verifyArm64Configuration.ps1 | 1 + .pipelines/versionAndSignCheck.ps1 | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index 565ba3cab7..40a0e4a866 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -143,13 +143,19 @@ jobs: - pwsh: |- & '.pipelines/applyXamlStyling.ps1' -Passive + displayName: Verify XAML formatting + + - pwsh: |- & '.pipelines/verifyNugetPackages.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln' + displayName: Verify Nuget package versions for PowerToys.sln + + - pwsh: |- & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln' & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln' & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln' & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln' & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln' - displayName: Verify formatting, nuget, and ARM64 configurations + displayName: Verify ARM64 configurations - ${{ if eq(parameters.enablePackageCaching, true) }}: - task: Cache@2 diff --git a/.pipelines/verifyArm64Configuration.ps1 b/.pipelines/verifyArm64Configuration.ps1 index 3a6a9cfe29..a509ec374f 100644 --- a/.pipelines/verifyArm64Configuration.ps1 +++ b/.pipelines/verifyArm64Configuration.ps1 @@ -59,6 +59,7 @@ if ($errorTable.Count -gt 0) { }; Write-Host -ForegroundColor Red `r } + Write-Error "Found arm64 verification errors." exit 1; } diff --git a/.pipelines/versionAndSignCheck.ps1 b/.pipelines/versionAndSignCheck.ps1 index 1b15fe52db..1baf34570e 100644 --- a/.pipelines/versionAndSignCheck.ps1 +++ b/.pipelines/versionAndSignCheck.ps1 @@ -48,7 +48,7 @@ $totalFailure = 0; Write-Host $DirPath; if (-not (Test-Path $DirPath)) { - Write-Host "Folder does not exist!" + Write-Error "Folder does not exist!" } Write-Host "Total items: " $items.Count @@ -79,6 +79,7 @@ $items | ForEach-Object { } if ($totalFailure -gt 0) { + Write-Error "Some items had issues." exit 1 } From f33855aaaa065c2a88a2f95966dc2647ebbfbcec Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:33:35 +0200 Subject: [PATCH 49/54] [Workspaces] re-implementing Monitor ID usage (#35427) --- .../WorkspacesEditor/Models/Application.cs | 33 +--------------- .../WorkspacesEditor/Models/Project.cs | 39 +++++++++++++++++++ .../WorkspacesEditor/Utils/DrawHelper.cs | 8 +++- 3 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs index 294d59854d..02681dd841 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Models/Application.cs @@ -360,38 +360,7 @@ namespace WorkspacesEditor.Models { if (_monitorSetup == null) { - _monitorSetup = Parent.Monitors.Where(x => x.MonitorNumber == MonitorNumber).FirstOrDefault(); - if (_monitorSetup == null) - { - // monitors changed: try to determine monitor id based on middle point - int middleX = Position.X + (Position.Width / 2); - int middleY = Position.Y + (Position.Height / 2); - var monitorCandidate = Parent.Monitors.Where(x => - (x.MonitorDpiUnawareBounds.Left < middleX) && - (x.MonitorDpiUnawareBounds.Right > middleX) && - (x.MonitorDpiUnawareBounds.Top < middleY) && - (x.MonitorDpiUnawareBounds.Bottom > middleY)).FirstOrDefault(); - if (monitorCandidate != null) - { - _monitorSetup = monitorCandidate; - MonitorNumber = monitorCandidate.MonitorNumber; - } - else - { - // monitors and even the app's area unknown, set the main monitor (which is closer to (0,0)) as the app's monitor - monitorCandidate = Parent.Monitors.OrderBy(x => Math.Abs(x.MonitorDpiUnawareBounds.Left) + Math.Abs(x.MonitorDpiUnawareBounds.Top)).FirstOrDefault(); - if (monitorCandidate != null) - { - _monitorSetup = monitorCandidate; - MonitorNumber = monitorCandidate.MonitorNumber; - } - else - { - // no monitors defined at all. - Logger.LogError($"Wrong workspace setup. No monitors defined for the workspace: {Parent.Name}."); - } - } - } + _monitorSetup = Parent.GetMonitorForApp(this); } return _monitorSetup; diff --git a/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs b/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs index 07d7ad40a1..e65853f1e3 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Models/Project.cs @@ -374,5 +374,44 @@ namespace WorkspacesEditor.Models app.IsExpanded = false; } } + + internal MonitorSetup GetMonitorForApp(Application app) + { + var monitorSetup = Monitors.Where(x => x.MonitorNumber == app.MonitorNumber).FirstOrDefault(); + if (monitorSetup == null) + { + // monitors changed: try to determine monitor id based on middle point + int middleX = app.Position.X + (app.Position.Width / 2); + int middleY = app.Position.Y + (app.Position.Height / 2); + var monitorCandidate = Monitors.Where(x => + (x.MonitorDpiUnawareBounds.Left < middleX) && + (x.MonitorDpiUnawareBounds.Right > middleX) && + (x.MonitorDpiUnawareBounds.Top < middleY) && + (x.MonitorDpiUnawareBounds.Bottom > middleY)).FirstOrDefault(); + if (monitorCandidate != null) + { + app.MonitorNumber = monitorCandidate.MonitorNumber; + return monitorCandidate; + } + else + { + // monitors and even the app's area unknown, set the main monitor (which is closer to (0,0)) as the app's monitor + monitorCandidate = Monitors.OrderBy(x => Math.Abs(x.MonitorDpiUnawareBounds.Left) + Math.Abs(x.MonitorDpiUnawareBounds.Top)).FirstOrDefault(); + if (monitorCandidate != null) + { + app.MonitorNumber = monitorCandidate.MonitorNumber; + return monitorCandidate; + } + else + { + // no monitors defined at all. + Logger.LogError($"Wrong workspace setup. No monitors defined for the workspace: {Name}."); + return null; + } + } + } + + return monitorSetup; + } } } diff --git a/src/modules/Workspaces/WorkspacesEditor/Utils/DrawHelper.cs b/src/modules/Workspaces/WorkspacesEditor/Utils/DrawHelper.cs index 217a942ba5..45da7a6c2c 100644 --- a/src/modules/Workspaces/WorkspacesEditor/Utils/DrawHelper.cs +++ b/src/modules/Workspaces/WorkspacesEditor/Utils/DrawHelper.cs @@ -54,7 +54,13 @@ namespace WorkspacesEditor.Utils if (app.Maximized) { Project project = app.Parent; - var monitor = project.Monitors.Where(x => x.MonitorNumber == app.MonitorNumber).FirstOrDefault(); + var monitor = project.GetMonitorForApp(app); + if (monitor == null) + { + // unrealistic case, there are no monitors at all in the workspace, use original rect + return new Rectangle(TransformX(app.ScaledPosition.X), TransformY(app.ScaledPosition.Y), Scaled(app.ScaledPosition.Width), Scaled(app.ScaledPosition.Height)); + } + return new Rectangle(TransformX(monitor.MonitorDpiAwareBounds.Left), TransformY(monitor.MonitorDpiAwareBounds.Top), Scaled(monitor.MonitorDpiAwareBounds.Width), Scaled(monitor.MonitorDpiAwareBounds.Height)); } else From c3fe541139a62916013f5fb0a71a7485770694e6 Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:34:20 +0200 Subject: [PATCH 50/54] [Workspaces] snapshot: fix coordinates for the minimized apps. (#35455) --- .../WorkspacesSnapshotTool/SnapshotUtils.cpp | 19 ++++++++++++++++--- .../WorkspacesSnapshotTool/SnapshotUtils.h | 2 +- .../WorkspacesSnapshotTool/main.cpp | 10 +++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp index 4642a5952e..519f2ccfa8 100644 --- a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp +++ b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.cpp @@ -168,7 +168,7 @@ namespace SnapshotUtils return false; } - std::vector GetApps(const std::function getMonitorNumberFromWindowHandle) + std::vector GetApps(const std::function getMonitorNumberFromWindowHandle, const std::function getMonitorRect) { std::vector apps{}; @@ -249,6 +249,19 @@ namespace SnapshotUtils continue; } + bool isMinimized = WindowUtils::IsMinimized(window); + unsigned int monitorNumber = getMonitorNumberFromWindowHandle(window); + + if (isMinimized) + { + // set the screen area as position, the values we get for the minimized windows are out of the screens' area + WorkspacesData::WorkspacesProject::Monitor::MonitorRect monitorRect = getMonitorRect(monitorNumber); + rect.left = monitorRect.left; + rect.top = monitorRect.top; + rect.right = monitorRect.left + monitorRect.width; + rect.bottom = monitorRect.top + monitorRect.height; + } + WorkspacesData::WorkspacesProject::Application app{ .name = data.value().name, .title = title, @@ -258,7 +271,7 @@ namespace SnapshotUtils .commandLineArgs = L"", // GetCommandLineArgs(pid, wbemHelper), .isElevated = IsProcessElevated(pid), .canLaunchElevated = data.value().canLaunchElevated, - .isMinimized = WindowUtils::IsMinimized(window), + .isMinimized = isMinimized, .isMaximized = WindowUtils::IsMaximized(window), .position = WorkspacesData::WorkspacesProject::Application::Position{ .x = rect.left, @@ -266,7 +279,7 @@ namespace SnapshotUtils .width = rect.right - rect.left, .height = rect.bottom - rect.top, }, - .monitor = getMonitorNumberFromWindowHandle(window), + .monitor = monitorNumber, }; apps.push_back(app); diff --git a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.h b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.h index 1009c60d3c..df95bbadf3 100644 --- a/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.h +++ b/src/modules/Workspaces/WorkspacesSnapshotTool/SnapshotUtils.h @@ -4,5 +4,5 @@ namespace SnapshotUtils { - std::vector GetApps(const std::function getMonitorNumberFromWindowHandle); + std::vector GetApps(const std::function getMonitorNumberFromWindowHandle, const std::function getMonitorRect); }; diff --git a/src/modules/Workspaces/WorkspacesSnapshotTool/main.cpp b/src/modules/Workspaces/WorkspacesSnapshotTool/main.cpp index b736ce238e..8a99ea6ef5 100644 --- a/src/modules/Workspaces/WorkspacesSnapshotTool/main.cpp +++ b/src/modules/Workspaces/WorkspacesSnapshotTool/main.cpp @@ -65,7 +65,15 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdLine, int cm } return monitorNumber; - }); + }, [&](unsigned int monitorId) -> WorkspacesData::WorkspacesProject::Monitor::MonitorRect { + for (const auto& monitor : project.monitors) + { + if (monitor.number == monitorId) + { + return monitor.monitorRectDpiUnaware; + } + } + return project.monitors[0].monitorRectDpiUnaware; }); JsonUtils::Write(WorkspacesData::TempWorkspacesFile(), project); Logger::trace(L"WorkspacesProject {}:{} created", project.name, project.id); From b0be69a1b73b5a9b78016acb1d057500c588364f Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:00:56 +0200 Subject: [PATCH 51/54] [Workspaces] eliminate crash threat (#35535) Co-authored-by: Seraphima --- .../Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs b/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs index 3f57532818..aae85161cb 100644 --- a/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs +++ b/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs @@ -398,6 +398,11 @@ namespace WorkspacesEditor.ViewModels public async void LaunchProject(Project project, bool exitAfterLaunch = false) { + if (project == null) + { + return; + } + await Task.Run(() => RunLauncher(project.Id, InvokePoint.EditorButton)); if (_workspacesEditorIO.ParseWorkspaces(this).Result == true) { From f9127b63a5d646f1c693567867db24456a59682c Mon Sep 17 00:00:00 2001 From: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> Date: Thu, 24 Oct 2024 21:55:51 +0200 Subject: [PATCH 52/54] [RegistryPreview] Adopt Monaco Editor (#35122) --- .github/actions/spell-check/excludes.txt | 12 +- PowerToys.sln | 1 + doc/devdocs/common/FilePreviewCommon.md | 22 +-- .../PowerToysSetup/PowerToysInstaller.wixproj | 2 +- src/Monaco.props | 30 ++++ .../Monaco/customLanguages/gitignore.js | 0 .../Assets => }/Monaco/customLanguages/reg.js | 0 .../Assets => }/Monaco/customTokenColors.js | 0 .../Monaco/generateLanguagesJson.html | 0 .../Assets => }/Monaco/index.html | 0 .../browser/ui/codicons/codicon/codicon.ttf | Bin .../base/common/worker/simpleWorker.nls.de.js | 0 .../base/common/worker/simpleWorker.nls.es.js | 0 .../base/common/worker/simpleWorker.nls.fr.js | 0 .../base/common/worker/simpleWorker.nls.it.js | 0 .../base/common/worker/simpleWorker.nls.ja.js | 0 .../vs/base/common/worker/simpleWorker.nls.js | 0 .../base/common/worker/simpleWorker.nls.ko.js | 0 .../base/common/worker/simpleWorker.nls.ru.js | 0 .../common/worker/simpleWorker.nls.zh-cn.js | 0 .../common/worker/simpleWorker.nls.zh-tw.js | 0 .../min/vs/base/worker/workerMain.js | 0 .../min/vs/basic-languages/abap/abap.js | 0 .../min/vs/basic-languages/apex/apex.js | 0 .../min/vs/basic-languages/azcli/azcli.js | 0 .../min/vs/basic-languages/bat/bat.js | 0 .../min/vs/basic-languages/bicep/bicep.js | 0 .../vs/basic-languages/cameligo/cameligo.js | 0 .../min/vs/basic-languages/clojure/clojure.js | 0 .../min/vs/basic-languages/coffee/coffee.js | 0 .../min/vs/basic-languages/cpp/cpp.js | 0 .../min/vs/basic-languages/csharp/csharp.js | 0 .../min/vs/basic-languages/csp/csp.js | 0 .../min/vs/basic-languages/css/css.js | 0 .../min/vs/basic-languages/cypher/cypher.js | 0 .../min/vs/basic-languages/dart/dart.js | 0 .../basic-languages/dockerfile/dockerfile.js | 0 .../min/vs/basic-languages/ecl/ecl.js | 0 .../min/vs/basic-languages/elixir/elixir.js | 0 .../min/vs/basic-languages/flow9/flow9.js | 0 .../freemarker2/freemarker2.js | 0 .../min/vs/basic-languages/fsharp/fsharp.js | 0 .../monacoSRC/min/vs/basic-languages/go/go.js | 0 .../min/vs/basic-languages/graphql/graphql.js | 0 .../basic-languages/handlebars/handlebars.js | 0 .../min/vs/basic-languages/hcl/hcl.js | 0 .../min/vs/basic-languages/html/html.js | 0 .../min/vs/basic-languages/ini/ini.js | 0 .../min/vs/basic-languages/java/java.js | 0 .../basic-languages/javascript/javascript.js | 0 .../min/vs/basic-languages/julia/julia.js | 0 .../min/vs/basic-languages/kotlin/kotlin.js | 0 .../min/vs/basic-languages/less/less.js | 0 .../min/vs/basic-languages/lexon/lexon.js | 0 .../min/vs/basic-languages/liquid/liquid.js | 0 .../min/vs/basic-languages/lua/lua.js | 0 .../monacoSRC/min/vs/basic-languages/m3/m3.js | 0 .../vs/basic-languages/markdown/markdown.js | 0 .../min/vs/basic-languages/mdx/mdx.js | 0 .../min/vs/basic-languages/mips/mips.js | 0 .../min/vs/basic-languages/msdax/msdax.js | 0 .../min/vs/basic-languages/mysql/mysql.js | 0 .../objective-c/objective-c.js | 0 .../min/vs/basic-languages/pascal/pascal.js | 0 .../vs/basic-languages/pascaligo/pascaligo.js | 0 .../min/vs/basic-languages/perl/perl.js | 0 .../min/vs/basic-languages/pgsql/pgsql.js | 0 .../min/vs/basic-languages/php/php.js | 0 .../min/vs/basic-languages/pla/pla.js | 0 .../vs/basic-languages/postiats/postiats.js | 0 .../basic-languages/powerquery/powerquery.js | 0 .../basic-languages/powershell/powershell.js | 0 .../vs/basic-languages/protobuf/protobuf.js | 0 .../min/vs/basic-languages/pug/pug.js | 0 .../min/vs/basic-languages/python/python.js | 0 .../min/vs/basic-languages/qsharp/qsharp.js | 0 .../monacoSRC/min/vs/basic-languages/r/r.js | 0 .../min/vs/basic-languages/razor/razor.js | 0 .../min/vs/basic-languages/redis/redis.js | 0 .../vs/basic-languages/redshift/redshift.js | 0 .../restructuredtext/restructuredtext.js | 0 .../min/vs/basic-languages/ruby/ruby.js | 0 .../min/vs/basic-languages/rust/rust.js | 0 .../monacoSRC/min/vs/basic-languages/sb/sb.js | 0 .../min/vs/basic-languages/scala/scala.js | 0 .../min/vs/basic-languages/scheme/scheme.js | 0 .../min/vs/basic-languages/scss/scss.js | 0 .../min/vs/basic-languages/shell/shell.js | 0 .../vs/basic-languages/solidity/solidity.js | 0 .../min/vs/basic-languages/sophia/sophia.js | 0 .../min/vs/basic-languages/sparql/sparql.js | 0 .../min/vs/basic-languages/sql/sql.js | 0 .../monacoSRC/min/vs/basic-languages/st/st.js | 0 .../min/vs/basic-languages/swift/swift.js | 0 .../systemverilog/systemverilog.js | 0 .../min/vs/basic-languages/tcl/tcl.js | 0 .../min/vs/basic-languages/twig/twig.js | 0 .../basic-languages/typescript/typescript.js | 0 .../monacoSRC/min/vs/basic-languages/vb/vb.js | 0 .../min/vs/basic-languages/wgsl/wgsl.js | 0 .../min/vs/basic-languages/xml/xml.js | 0 .../min/vs/basic-languages/yaml/yaml.js | 0 .../monacoSRC/min/vs/editor/editor.main.css | 0 .../monacoSRC/min/vs/editor/editor.main.js | 0 .../min/vs/editor/editor.main.nls.de.js | 0 .../min/vs/editor/editor.main.nls.es.js | 0 .../min/vs/editor/editor.main.nls.fr.js | 0 .../min/vs/editor/editor.main.nls.it.js | 0 .../min/vs/editor/editor.main.nls.ja.js | 0 .../min/vs/editor/editor.main.nls.js | 0 .../min/vs/editor/editor.main.nls.ko.js | 0 .../min/vs/editor/editor.main.nls.ru.js | 0 .../min/vs/editor/editor.main.nls.zh-cn.js | 0 .../min/vs/editor/editor.main.nls.zh-tw.js | 0 .../monacoSRC/min/vs/language/css/cssMode.js | 0 .../min/vs/language/css/cssWorker.js | 0 .../min/vs/language/html/htmlMode.js | 0 .../min/vs/language/html/htmlWorker.js | 0 .../min/vs/language/json/jsonMode.js | 0 .../min/vs/language/json/jsonWorker.js | 0 .../min/vs/language/typescript/tsMode.js | 0 .../min/vs/language/typescript/tsWorker.js | 0 .../Monaco/monacoSRC/min/vs/loader.js | 0 .../Monaco/monacoSpecialLanguages.js | 0 .../Assets => }/Monaco/monaco_languages.json | 0 .../FilePreviewCommon.csproj | 25 +-- .../Assets/RegistryPreview/index.html | 64 +++++++ .../MonacoEditorControl.xaml | 35 ++++ .../MonacoEditorControl.xaml.cs | 169 ++++++++++++++++++ .../RegistryPreviewUILib/MonacoHelper.cs | 50 ++++++ .../RegistryPreviewMainPage.Events.cs | 62 +++---- .../RegistryPreviewMainPage.Utilities.cs | 78 ++++---- .../RegistryPreviewMainPage.xaml | 23 +-- .../RegistryPreviewUILib.csproj | 13 ++ .../Strings/en-US/Resources.resw | 3 - 135 files changed, 456 insertions(+), 133 deletions(-) create mode 100644 src/Monaco.props rename src/{common/FilePreviewCommon/Assets => }/Monaco/customLanguages/gitignore.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/customLanguages/reg.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/customTokenColors.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/generateLanguagesJson.html (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/index.html (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/browser/ui/codicons/codicon/codicon.ttf (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.de.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.es.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.fr.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.it.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ja.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ko.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ru.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/base/worker/workerMain.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/abap/abap.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/apex/apex.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/azcli/azcli.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/bat/bat.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/bicep/bicep.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/cameligo/cameligo.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/clojure/clojure.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/coffee/coffee.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/cpp/cpp.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/csharp/csharp.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/csp/csp.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/css/css.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/cypher/cypher.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/dart/dart.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/dockerfile/dockerfile.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/ecl/ecl.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/elixir/elixir.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/flow9/flow9.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/freemarker2/freemarker2.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/fsharp/fsharp.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/go/go.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/graphql/graphql.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/handlebars/handlebars.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/hcl/hcl.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/html/html.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/ini/ini.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/java/java.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/javascript/javascript.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/julia/julia.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/kotlin/kotlin.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/less/less.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/lexon/lexon.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/liquid/liquid.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/lua/lua.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/m3/m3.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/markdown/markdown.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/mdx/mdx.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/mips/mips.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/msdax/msdax.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/mysql/mysql.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/objective-c/objective-c.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/pascal/pascal.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/pascaligo/pascaligo.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/perl/perl.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/pgsql/pgsql.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/php/php.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/pla/pla.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/postiats/postiats.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/powerquery/powerquery.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/powershell/powershell.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/protobuf/protobuf.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/pug/pug.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/python/python.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/qsharp/qsharp.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/r/r.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/razor/razor.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/redis/redis.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/redshift/redshift.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/restructuredtext/restructuredtext.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/ruby/ruby.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/rust/rust.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/sb/sb.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/scala/scala.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/scheme/scheme.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/scss/scss.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/shell/shell.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/solidity/solidity.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/sophia/sophia.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/sparql/sparql.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/sql/sql.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/st/st.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/swift/swift.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/systemverilog/systemverilog.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/tcl/tcl.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/twig/twig.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/typescript/typescript.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/vb/vb.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/wgsl/wgsl.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/xml/xml.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/basic-languages/yaml/yaml.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.css (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.de.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.es.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.fr.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.it.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ja.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ko.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ru.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-cn.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-tw.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/css/cssMode.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/css/cssWorker.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/html/htmlMode.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/html/htmlWorker.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/json/jsonMode.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/json/jsonWorker.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/typescript/tsMode.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/language/typescript/tsWorker.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSRC/min/vs/loader.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monacoSpecialLanguages.js (100%) rename src/{common/FilePreviewCommon/Assets => }/Monaco/monaco_languages.json (100%) create mode 100644 src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html create mode 100644 src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml create mode 100644 src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml.cs create mode 100644 src/modules/registrypreview/RegistryPreviewUILib/MonacoHelper.cs diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt index fd89d668a2..fa1d25eda9 100644 --- a/.github/actions/spell-check/excludes.txt +++ b/.github/actions/spell-check/excludes.txt @@ -2,11 +2,11 @@ (?:^|/)(?i)COPYRIGHT (?:^|/)(?i)LICEN[CS]E (?:^|/)3rdparty/ -(?:^|/)FilePreviewCommon/Assets/Monaco/customLanguages/ -(?:^|/)FilePreviewCommon/Assets/Monaco/generateLanguagesJson.html -(?:^|/)FilePreviewCommon/Assets/Monaco/index.html -(?:^|/)FilePreviewCommon/Assets/Monaco/monaco_languages.json -(?:^|/)FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js +(?:^|/)src/Monaco/customLanguages/ +(?:^|/)src/Monaco/generateLanguagesJson.html +(?:^|/)src/Monaco/index.html +(?:^|/)src/Monaco/monaco_languages.json +(?:^|/)src/Monaco/monacoSpecialLanguages.js (?:^|/)go\.sum$ (?:^|/)monacoSRC/ (?:^|/)package(?:-lock|)\.json$ @@ -99,7 +99,7 @@ ^\Q.pipelines/ESRPSigning_core.json\E$ ^\Q.pipelines/sdl.gdnbaselines\E$ ^\Qinstaller/PowerToysSetup/Settings.wxs\E$ -^\Qsrc/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json\E$ +^\Qsrc/Monaco/monaco_languages.json\E$ ^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$ ^\Qsrc/common/notifications/BackgroundActivatorDLL/cpp.hint\E$ ^\Qsrc/modules/colorPicker/ColorPickerUI/Assets/ColorPicker/colorPicker.cur\E$ diff --git a/PowerToys.sln b/PowerToys.sln index 29744af75f..fa6b20aacf 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -177,6 +177,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets Directory.Packages.props = Directory.Packages.props + src\Monaco.props = src\Monaco.props Solution.props = Solution.props src\Version.props = src\Version.props EndProjectSection diff --git a/doc/devdocs/common/FilePreviewCommon.md b/doc/devdocs/common/FilePreviewCommon.md index aee9de2b2a..85b74ca7e7 100644 --- a/doc/devdocs/common/FilePreviewCommon.md +++ b/doc/devdocs/common/FilePreviewCommon.md @@ -12,14 +12,14 @@ This previewer is used for the File Explorer Dev File Previewer, as well as Powe 1. Download Monaco editor with [npm](https://www.npmjs.com/): Run `npm i monaco-editor` in the command prompt. 2. Delete everything except the `min` folder (the minimised code) from the downloaded files. -3. Copy the `min` folder into the `src/common/FilePreviewCommon/Assets/Monaco/monacoSRC` folder of the PowerToys project. +3. Copy the `min` folder into the `/src/Monaco/monacoSRC` folder of the PowerToys project. 4. Generate the JSON file as described in the generate [monaco_languages.json file](#monaco_languagesjson) section. ### Add a new language definition -As an example on how to add a new language definition you can look at the one for [registry files](/src/common/FilePreviewCommon/Assets/Monaco/customLanguages/reg.js). +As an example on how to add a new language definition you can look at the one for [registry files](/src/Monaco/customLanguages/reg.js). -1. Add the new language definition (written with [Monarch](https://microsoft.github.io/monaco-editor/monarch.html)) as a new file to the [folder containing Monaco custom languages](/src/common/FilePreviewCommon/Assets/Monaco/customLanguages/) (Remember the file name and the string you used for "idDefinition" as you need it later.). The file should be formatted like in the example below. (Please change `idDefinition` to the name of your language.) +1. Add the new language definition (written with [Monarch](https://microsoft.github.io/monaco-editor/monarch.html)) as a new file to the [folder containing Monaco custom languages](/src/Monaco/customLanguages/) (Remember the file name and the string you used for "idDefinition" as you need it later.). The file should be formatted like in the example below. (Please change `idDefinition` to the name of your language.) ```javascript export function idDefinition() { @@ -29,7 +29,7 @@ export function idDefinition() { } ``` -2. Add the following line to the [`monacoSpecialLanguages.js`](/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js) file, after the other import statements: +2. Add the following line to the [`monacoSpecialLanguages.js`](/src/Monaco/monacoSpecialLanguages.js) file, after the other import statements: ```javascript import { idDefinition } from './customLanguages/file.js'; @@ -37,7 +37,7 @@ import { idDefinition } from './customLanguages/file.js'; > Replace file.js with the name of your definition file from step 1. Please replace idDefinition with the string you used in step 1. -3. In the [`monacoSpecialLanguages.js`](/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js) file add the following line into the `registerAdditionalLanguages` function: +3. In the [`monacoSpecialLanguages.js`](/src/Monaco/monacoSpecialLanguages.js) file add the following line into the `registerAdditionalLanguages` function: ```javascript registerAdditionalNewLanguage("id", [".fileExtension"], idDefinition(), monaco) @@ -47,7 +47,7 @@ registerAdditionalNewLanguage("id", [".fileExtension"], idDefinition(), monaco) * The id can be anything. Recommended is one of the file extensions. For example "php" or "reg". -4. In case you wish to add a custom color for a token, you can do so by adding the following line to [`customTokenColors.js`](/src/common/FilePreviewCommon/Assets/Monaco/customTokenColors.js): +4. In case you wish to add a custom color for a token, you can do so by adding the following line to [`customTokenColors.js`](/src/Monaco/customTokenColors.js): ```javascript {token: 'token-name', foreground: 'ff0000'} ``` @@ -60,7 +60,7 @@ registerAdditionalNewLanguage("id", [".fileExtension"], idDefinition(), monaco) ### Add a new file extension to an existing language -1. In the [`monacoSpecialLanguages.js`](/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js) file add the following line to the `registerAdditionalLanguages` function. (`existingId` is the id of the language you want to add the extension to. You can find these id's in the [`monaco_languages.json`](/src/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json) file): +1. In the [`monacoSpecialLanguages.js`](/src/Monaco/monacoSpecialLanguages.js) file add the following line to the `registerAdditionalLanguages` function. (`existingId` is the id of the language you want to add the extension to. You can find these id's in the [`monaco_languages.json`](/src/Monaco/monaco_languages.json) file): ```javascript registerAdditionalLanguage("id", [".fileExtension"], "existingId", monaco) @@ -68,17 +68,17 @@ registerAdditionalLanguage("id", [".fileExtension"], "existingId", monaco) * If for instance you want to add more extensions to the php language set the id to `phpExt` and the existingId to `php`. -2. Copy the existing language definition into the `languageDefinitions` function in the same file. You can find the existing definitions in the following folder: [`/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/`](/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/). +2. Copy the existing language definition into the `languageDefinitions` function in the same file. You can find the existing definitions in the following folder: [`/src/Monaco/monacoSRC/min/vs/basic-languages/`](/src/Monaco/monacoSRC/min/vs/basic-languages/). 3. Execute the steps described in the [monaco_languages.json](#monaco_languagesjson) section. ### monaco_languages.json -[`monaco_languages.json`](/src/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json) contains all extensions and IDs for the languages supported by Monaco. The [`MonacoHelper`](/src/common/FilePreviewCommon/MonacoHelper.cs) class and the installer are using this file to register preview handlers for the defined extensions. +[`monaco_languages.json`](/src/Monaco/monaco_languages.json) contains all extensions and IDs for the languages supported by Monaco. The [`MonacoHelper`](/src/common/FilePreviewCommon/MonacoHelper.cs) class and the installer are using this file to register preview handlers for the defined extensions. -After updating Monaco Editor and/or adding a new language you should update the [`monaco_languages.json`](/src/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json) file. +After updating Monaco Editor and/or adding a new language you should update the [`monaco_languages.json`](/src/Monaco/monaco_languages.json) file. -1. Run the [`generateLanguagesJson.html`](/src/common/FilePreviewCommon/Assets/Monaco/generateLanguagesJson.html) file on a local webserver (as webbrowsers will block certain needed features when running the file locally.) +1. Run the [`generateLanguagesJson.html`](/src/Monaco/generateLanguagesJson.html) file on a local webserver (as webbrowsers will block certain needed features when running the file locally.) * This can for example be achieved by using the [Preview Server](https://marketplace.visualstudio.com/items?itemName=yuichinukiyama.vscode-preview-server) extension for Visual Studio Code: Open the file in Visual Studio Code, right click in the code editor and select `vscode-preview-server: Launch on browser`. The file will be opened in a browser. 2. The browser will download the new `monaco_languages.json` file 3. Replace the old file with the newly downloaded one in the source code folder. diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index 2826a68493..8771920c3c 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -181,7 +181,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil --> - + diff --git a/src/Monaco.props b/src/Monaco.props new file mode 100644 index 0000000000..0aeef121e2 --- /dev/null +++ b/src/Monaco.props @@ -0,0 +1,30 @@ + + + + + + Assets\Monaco\customTokenColors.js + Always + + + Assets\Monaco\monacoSpecialLanguages.js + Always + + + Assets\Monaco\index.html + Always + + + Assets\Monaco\monaco_languages.json + Always + + + Assets\Monaco\monacoSRC\%(RecursiveDir)%(FileName)%(Extension) + Always + + + Assets\Monaco\customLanguages\%(RecursiveDir)%(FileName)%(Extension) + Always + + + \ No newline at end of file diff --git a/src/common/FilePreviewCommon/Assets/Monaco/customLanguages/gitignore.js b/src/Monaco/customLanguages/gitignore.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/customLanguages/gitignore.js rename to src/Monaco/customLanguages/gitignore.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/customLanguages/reg.js b/src/Monaco/customLanguages/reg.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/customLanguages/reg.js rename to src/Monaco/customLanguages/reg.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/customTokenColors.js b/src/Monaco/customTokenColors.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/customTokenColors.js rename to src/Monaco/customTokenColors.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/generateLanguagesJson.html b/src/Monaco/generateLanguagesJson.html similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/generateLanguagesJson.html rename to src/Monaco/generateLanguagesJson.html diff --git a/src/common/FilePreviewCommon/Assets/Monaco/index.html b/src/Monaco/index.html similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/index.html rename to src/Monaco/index.html diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/browser/ui/codicons/codicon/codicon.ttf b/src/Monaco/monacoSRC/min/vs/base/browser/ui/codicons/codicon/codicon.ttf similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/browser/ui/codicons/codicon/codicon.ttf rename to src/Monaco/monacoSRC/min/vs/base/browser/ui/codicons/codicon/codicon.ttf diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.de.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.de.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.de.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.de.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.es.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.es.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.es.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.es.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.fr.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.fr.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.fr.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.fr.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.it.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.it.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.it.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.it.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ja.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ja.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ja.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ja.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ko.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ko.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ko.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ko.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ru.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ru.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ru.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.ru.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js b/src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js rename to src/Monaco/monacoSRC/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/worker/workerMain.js b/src/Monaco/monacoSRC/min/vs/base/worker/workerMain.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/base/worker/workerMain.js rename to src/Monaco/monacoSRC/min/vs/base/worker/workerMain.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/abap/abap.js b/src/Monaco/monacoSRC/min/vs/basic-languages/abap/abap.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/abap/abap.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/abap/abap.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/apex/apex.js b/src/Monaco/monacoSRC/min/vs/basic-languages/apex/apex.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/apex/apex.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/apex/apex.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/azcli/azcli.js b/src/Monaco/monacoSRC/min/vs/basic-languages/azcli/azcli.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/azcli/azcli.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/azcli/azcli.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/bat/bat.js b/src/Monaco/monacoSRC/min/vs/basic-languages/bat/bat.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/bat/bat.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/bat/bat.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/bicep/bicep.js b/src/Monaco/monacoSRC/min/vs/basic-languages/bicep/bicep.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/bicep/bicep.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/bicep/bicep.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cameligo/cameligo.js b/src/Monaco/monacoSRC/min/vs/basic-languages/cameligo/cameligo.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cameligo/cameligo.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/cameligo/cameligo.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/clojure/clojure.js b/src/Monaco/monacoSRC/min/vs/basic-languages/clojure/clojure.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/clojure/clojure.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/clojure/clojure.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/coffee/coffee.js b/src/Monaco/monacoSRC/min/vs/basic-languages/coffee/coffee.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/coffee/coffee.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/coffee/coffee.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cpp/cpp.js b/src/Monaco/monacoSRC/min/vs/basic-languages/cpp/cpp.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cpp/cpp.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/cpp/cpp.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/csharp/csharp.js b/src/Monaco/monacoSRC/min/vs/basic-languages/csharp/csharp.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/csharp/csharp.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/csharp/csharp.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/csp/csp.js b/src/Monaco/monacoSRC/min/vs/basic-languages/csp/csp.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/csp/csp.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/csp/csp.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/css/css.js b/src/Monaco/monacoSRC/min/vs/basic-languages/css/css.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/css/css.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/css/css.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cypher/cypher.js b/src/Monaco/monacoSRC/min/vs/basic-languages/cypher/cypher.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/cypher/cypher.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/cypher/cypher.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/dart/dart.js b/src/Monaco/monacoSRC/min/vs/basic-languages/dart/dart.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/dart/dart.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/dart/dart.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/dockerfile/dockerfile.js b/src/Monaco/monacoSRC/min/vs/basic-languages/dockerfile/dockerfile.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/dockerfile/dockerfile.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/dockerfile/dockerfile.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ecl/ecl.js b/src/Monaco/monacoSRC/min/vs/basic-languages/ecl/ecl.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ecl/ecl.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/ecl/ecl.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/elixir/elixir.js b/src/Monaco/monacoSRC/min/vs/basic-languages/elixir/elixir.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/elixir/elixir.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/elixir/elixir.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/flow9/flow9.js b/src/Monaco/monacoSRC/min/vs/basic-languages/flow9/flow9.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/flow9/flow9.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/flow9/flow9.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/freemarker2/freemarker2.js b/src/Monaco/monacoSRC/min/vs/basic-languages/freemarker2/freemarker2.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/freemarker2/freemarker2.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/freemarker2/freemarker2.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/fsharp/fsharp.js b/src/Monaco/monacoSRC/min/vs/basic-languages/fsharp/fsharp.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/fsharp/fsharp.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/fsharp/fsharp.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/go/go.js b/src/Monaco/monacoSRC/min/vs/basic-languages/go/go.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/go/go.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/go/go.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/graphql/graphql.js b/src/Monaco/monacoSRC/min/vs/basic-languages/graphql/graphql.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/graphql/graphql.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/graphql/graphql.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/handlebars/handlebars.js b/src/Monaco/monacoSRC/min/vs/basic-languages/handlebars/handlebars.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/handlebars/handlebars.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/handlebars/handlebars.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/hcl/hcl.js b/src/Monaco/monacoSRC/min/vs/basic-languages/hcl/hcl.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/hcl/hcl.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/hcl/hcl.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/html/html.js b/src/Monaco/monacoSRC/min/vs/basic-languages/html/html.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/html/html.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/html/html.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ini/ini.js b/src/Monaco/monacoSRC/min/vs/basic-languages/ini/ini.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ini/ini.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/ini/ini.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/java/java.js b/src/Monaco/monacoSRC/min/vs/basic-languages/java/java.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/java/java.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/java/java.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/javascript/javascript.js b/src/Monaco/monacoSRC/min/vs/basic-languages/javascript/javascript.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/javascript/javascript.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/javascript/javascript.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/julia/julia.js b/src/Monaco/monacoSRC/min/vs/basic-languages/julia/julia.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/julia/julia.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/julia/julia.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/kotlin/kotlin.js b/src/Monaco/monacoSRC/min/vs/basic-languages/kotlin/kotlin.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/kotlin/kotlin.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/kotlin/kotlin.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/less/less.js b/src/Monaco/monacoSRC/min/vs/basic-languages/less/less.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/less/less.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/less/less.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/lexon/lexon.js b/src/Monaco/monacoSRC/min/vs/basic-languages/lexon/lexon.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/lexon/lexon.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/lexon/lexon.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/liquid/liquid.js b/src/Monaco/monacoSRC/min/vs/basic-languages/liquid/liquid.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/liquid/liquid.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/liquid/liquid.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/lua/lua.js b/src/Monaco/monacoSRC/min/vs/basic-languages/lua/lua.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/lua/lua.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/lua/lua.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/m3/m3.js b/src/Monaco/monacoSRC/min/vs/basic-languages/m3/m3.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/m3/m3.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/m3/m3.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/markdown/markdown.js b/src/Monaco/monacoSRC/min/vs/basic-languages/markdown/markdown.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/markdown/markdown.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/markdown/markdown.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mdx/mdx.js b/src/Monaco/monacoSRC/min/vs/basic-languages/mdx/mdx.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mdx/mdx.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/mdx/mdx.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mips/mips.js b/src/Monaco/monacoSRC/min/vs/basic-languages/mips/mips.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mips/mips.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/mips/mips.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/msdax/msdax.js b/src/Monaco/monacoSRC/min/vs/basic-languages/msdax/msdax.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/msdax/msdax.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/msdax/msdax.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mysql/mysql.js b/src/Monaco/monacoSRC/min/vs/basic-languages/mysql/mysql.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/mysql/mysql.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/mysql/mysql.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/objective-c/objective-c.js b/src/Monaco/monacoSRC/min/vs/basic-languages/objective-c/objective-c.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/objective-c/objective-c.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/objective-c/objective-c.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pascal/pascal.js b/src/Monaco/monacoSRC/min/vs/basic-languages/pascal/pascal.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pascal/pascal.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/pascal/pascal.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pascaligo/pascaligo.js b/src/Monaco/monacoSRC/min/vs/basic-languages/pascaligo/pascaligo.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pascaligo/pascaligo.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/pascaligo/pascaligo.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/perl/perl.js b/src/Monaco/monacoSRC/min/vs/basic-languages/perl/perl.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/perl/perl.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/perl/perl.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pgsql/pgsql.js b/src/Monaco/monacoSRC/min/vs/basic-languages/pgsql/pgsql.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pgsql/pgsql.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/pgsql/pgsql.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/php/php.js b/src/Monaco/monacoSRC/min/vs/basic-languages/php/php.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/php/php.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/php/php.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pla/pla.js b/src/Monaco/monacoSRC/min/vs/basic-languages/pla/pla.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pla/pla.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/pla/pla.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/postiats/postiats.js b/src/Monaco/monacoSRC/min/vs/basic-languages/postiats/postiats.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/postiats/postiats.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/postiats/postiats.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/powerquery/powerquery.js b/src/Monaco/monacoSRC/min/vs/basic-languages/powerquery/powerquery.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/powerquery/powerquery.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/powerquery/powerquery.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/powershell/powershell.js b/src/Monaco/monacoSRC/min/vs/basic-languages/powershell/powershell.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/powershell/powershell.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/powershell/powershell.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/protobuf/protobuf.js b/src/Monaco/monacoSRC/min/vs/basic-languages/protobuf/protobuf.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/protobuf/protobuf.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/protobuf/protobuf.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pug/pug.js b/src/Monaco/monacoSRC/min/vs/basic-languages/pug/pug.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/pug/pug.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/pug/pug.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/python/python.js b/src/Monaco/monacoSRC/min/vs/basic-languages/python/python.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/python/python.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/python/python.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/qsharp/qsharp.js b/src/Monaco/monacoSRC/min/vs/basic-languages/qsharp/qsharp.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/qsharp/qsharp.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/qsharp/qsharp.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/r/r.js b/src/Monaco/monacoSRC/min/vs/basic-languages/r/r.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/r/r.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/r/r.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/razor/razor.js b/src/Monaco/monacoSRC/min/vs/basic-languages/razor/razor.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/razor/razor.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/razor/razor.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/redis/redis.js b/src/Monaco/monacoSRC/min/vs/basic-languages/redis/redis.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/redis/redis.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/redis/redis.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/redshift/redshift.js b/src/Monaco/monacoSRC/min/vs/basic-languages/redshift/redshift.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/redshift/redshift.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/redshift/redshift.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/restructuredtext/restructuredtext.js b/src/Monaco/monacoSRC/min/vs/basic-languages/restructuredtext/restructuredtext.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/restructuredtext/restructuredtext.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/restructuredtext/restructuredtext.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ruby/ruby.js b/src/Monaco/monacoSRC/min/vs/basic-languages/ruby/ruby.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/ruby/ruby.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/ruby/ruby.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/rust/rust.js b/src/Monaco/monacoSRC/min/vs/basic-languages/rust/rust.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/rust/rust.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/rust/rust.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sb/sb.js b/src/Monaco/monacoSRC/min/vs/basic-languages/sb/sb.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sb/sb.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/sb/sb.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scala/scala.js b/src/Monaco/monacoSRC/min/vs/basic-languages/scala/scala.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scala/scala.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/scala/scala.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scheme/scheme.js b/src/Monaco/monacoSRC/min/vs/basic-languages/scheme/scheme.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scheme/scheme.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/scheme/scheme.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scss/scss.js b/src/Monaco/monacoSRC/min/vs/basic-languages/scss/scss.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/scss/scss.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/scss/scss.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/shell/shell.js b/src/Monaco/monacoSRC/min/vs/basic-languages/shell/shell.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/shell/shell.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/shell/shell.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/solidity/solidity.js b/src/Monaco/monacoSRC/min/vs/basic-languages/solidity/solidity.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/solidity/solidity.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/solidity/solidity.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sophia/sophia.js b/src/Monaco/monacoSRC/min/vs/basic-languages/sophia/sophia.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sophia/sophia.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/sophia/sophia.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sparql/sparql.js b/src/Monaco/monacoSRC/min/vs/basic-languages/sparql/sparql.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sparql/sparql.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/sparql/sparql.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sql/sql.js b/src/Monaco/monacoSRC/min/vs/basic-languages/sql/sql.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/sql/sql.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/sql/sql.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/st/st.js b/src/Monaco/monacoSRC/min/vs/basic-languages/st/st.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/st/st.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/st/st.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/swift/swift.js b/src/Monaco/monacoSRC/min/vs/basic-languages/swift/swift.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/swift/swift.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/swift/swift.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/systemverilog/systemverilog.js b/src/Monaco/monacoSRC/min/vs/basic-languages/systemverilog/systemverilog.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/systemverilog/systemverilog.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/systemverilog/systemverilog.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/tcl/tcl.js b/src/Monaco/monacoSRC/min/vs/basic-languages/tcl/tcl.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/tcl/tcl.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/tcl/tcl.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/twig/twig.js b/src/Monaco/monacoSRC/min/vs/basic-languages/twig/twig.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/twig/twig.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/twig/twig.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/typescript/typescript.js b/src/Monaco/monacoSRC/min/vs/basic-languages/typescript/typescript.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/typescript/typescript.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/typescript/typescript.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/vb/vb.js b/src/Monaco/monacoSRC/min/vs/basic-languages/vb/vb.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/vb/vb.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/vb/vb.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/wgsl/wgsl.js b/src/Monaco/monacoSRC/min/vs/basic-languages/wgsl/wgsl.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/wgsl/wgsl.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/wgsl/wgsl.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/xml/xml.js b/src/Monaco/monacoSRC/min/vs/basic-languages/xml/xml.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/xml/xml.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/xml/xml.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/yaml/yaml.js b/src/Monaco/monacoSRC/min/vs/basic-languages/yaml/yaml.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/basic-languages/yaml/yaml.js rename to src/Monaco/monacoSRC/min/vs/basic-languages/yaml/yaml.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.css b/src/Monaco/monacoSRC/min/vs/editor/editor.main.css similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.css rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.css diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.de.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.de.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.de.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.de.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.es.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.es.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.es.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.es.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.fr.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.fr.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.fr.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.fr.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.it.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.it.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.it.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.it.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ja.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ja.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ja.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ja.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ko.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ko.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ko.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ko.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ru.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ru.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ru.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.ru.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-cn.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-cn.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-cn.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-cn.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-tw.js b/src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-tw.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-tw.js rename to src/Monaco/monacoSRC/min/vs/editor/editor.main.nls.zh-tw.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/css/cssMode.js b/src/Monaco/monacoSRC/min/vs/language/css/cssMode.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/css/cssMode.js rename to src/Monaco/monacoSRC/min/vs/language/css/cssMode.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/css/cssWorker.js b/src/Monaco/monacoSRC/min/vs/language/css/cssWorker.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/css/cssWorker.js rename to src/Monaco/monacoSRC/min/vs/language/css/cssWorker.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/html/htmlMode.js b/src/Monaco/monacoSRC/min/vs/language/html/htmlMode.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/html/htmlMode.js rename to src/Monaco/monacoSRC/min/vs/language/html/htmlMode.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/html/htmlWorker.js b/src/Monaco/monacoSRC/min/vs/language/html/htmlWorker.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/html/htmlWorker.js rename to src/Monaco/monacoSRC/min/vs/language/html/htmlWorker.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/json/jsonMode.js b/src/Monaco/monacoSRC/min/vs/language/json/jsonMode.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/json/jsonMode.js rename to src/Monaco/monacoSRC/min/vs/language/json/jsonMode.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/json/jsonWorker.js b/src/Monaco/monacoSRC/min/vs/language/json/jsonWorker.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/json/jsonWorker.js rename to src/Monaco/monacoSRC/min/vs/language/json/jsonWorker.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/typescript/tsMode.js b/src/Monaco/monacoSRC/min/vs/language/typescript/tsMode.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/typescript/tsMode.js rename to src/Monaco/monacoSRC/min/vs/language/typescript/tsMode.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/typescript/tsWorker.js b/src/Monaco/monacoSRC/min/vs/language/typescript/tsWorker.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/language/typescript/tsWorker.js rename to src/Monaco/monacoSRC/min/vs/language/typescript/tsWorker.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/loader.js b/src/Monaco/monacoSRC/min/vs/loader.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSRC/min/vs/loader.js rename to src/Monaco/monacoSRC/min/vs/loader.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js b/src/Monaco/monacoSpecialLanguages.js similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js rename to src/Monaco/monacoSpecialLanguages.js diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json b/src/Monaco/monaco_languages.json similarity index 100% rename from src/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json rename to src/Monaco/monaco_languages.json diff --git a/src/common/FilePreviewCommon/FilePreviewCommon.csproj b/src/common/FilePreviewCommon/FilePreviewCommon.csproj index 5849155ca0..28865605a0 100644 --- a/src/common/FilePreviewCommon/FilePreviewCommon.csproj +++ b/src/common/FilePreviewCommon/FilePreviewCommon.csproj @@ -1,6 +1,7 @@  + PowerToys FilePreviewCommon @@ -15,28 +16,4 @@ - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - diff --git a/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html b/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html new file mode 100644 index 0000000000..5709e3f4f1 --- /dev/null +++ b/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html @@ -0,0 +1,64 @@ + + + + + + + + + Registry Preview Editor + + + + + +
+ + + + + diff --git a/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml b/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml new file mode 100644 index 0000000000..9635708343 --- /dev/null +++ b/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + diff --git a/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml.cs b/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml.cs new file mode 100644 index 0000000000..eeddfcb0f4 --- /dev/null +++ b/src/modules/registrypreview/RegistryPreviewUILib/MonacoEditorControl.xaml.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Reflection; +using System.Text.Json.Nodes; +using System.Threading.Tasks; +using System.Timers; +using System.Web; +using CommunityToolkit.Mvvm.ComponentModel; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.Web.WebView2.Core; +using Windows.UI; + +namespace RegistryPreviewUILib +{ + [INotifyPropertyChanged] + public sealed partial class MonacoEditorControl : UserControl, IDisposable + { + private readonly Timer _textChangedThrottle; + private bool _textChangedThrottled; + + public string Text { get; private set; } + + [ObservableProperty] + private bool _isLoading; + + public event EventHandler TextChanged; + + public MonacoEditorControl() + { + InitializeComponent(); + Environment.SetEnvironmentVariable("WEBVIEW2_USER_DATA_FOLDER", MonacoHelper.TempFolderPath, EnvironmentVariableTarget.Process); + + _textChangedThrottle = new Timer(250); + _textChangedThrottle.Elapsed += OnTextChangedThrottleElapsed; + _textChangedThrottle.AutoReset = false; + + ActualThemeChanged += OnActualThemeChanged; + } + + public async Task SetTextAsync(string text) + { + Text = text; + + if (!IsLoading) + { + var encodedText = HttpUtility.JavaScriptStringEncode(text); + await Browser.CoreWebView2.ExecuteScriptAsync($"editor.setValue('{encodedText}')"); + } + } + + private async void OnActualThemeChanged(FrameworkElement sender, object args) + { + await SetThemeAsync(); + } + + private async void Browser_Loaded(object sender, RoutedEventArgs e) + { + IsLoading = true; + + await Browser.EnsureCoreWebView2Async(); + Browser.DefaultBackgroundColor = Color.FromArgb(0, 0, 0, 0); + Browser.CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; + Browser.CoreWebView2.PermissionRequested += CoreWebView2_PermissionRequested; + Browser.CoreWebView2.Settings.AreDefaultScriptDialogsEnabled = false; + Browser.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; + Browser.CoreWebView2.Settings.AreHostObjectsAllowed = false; + Browser.CoreWebView2.Settings.IsGeneralAutofillEnabled = false; + Browser.CoreWebView2.Settings.IsPasswordAutosaveEnabled = false; + Browser.CoreWebView2.Settings.IsScriptEnabled = true; + Browser.CoreWebView2.Settings.IsWebMessageEnabled = true; +#if DEBUG + Browser.CoreWebView2.Settings.AreDevToolsEnabled = true; +#else + Browser.CoreWebView2.Settings.AreDevToolsEnabled = false; +#endif + + Browser.CoreWebView2.SetVirtualHostNameToFolderMapping( + MonacoHelper.VirtualHostName, + MonacoHelper.MonacoDirectory, + CoreWebView2HostResourceAccessKind.Allow); + + var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty; + var index = Path.GetFullPath(Path.Combine(assemblyDir, "Assets", "RegistryPreview", "index.html")); + Browser.CoreWebView2.Navigate(index); + } + + private void CoreWebView2_PermissionRequested(CoreWebView2 sender, CoreWebView2PermissionRequestedEventArgs args) + { + if (args.PermissionKind == CoreWebView2PermissionKind.ClipboardRead) + { + // Hide the permission request dialog + args.State = CoreWebView2PermissionState.Allow; + args.Handled = true; + } + } + + private async void CoreWebView2_NavigationCompleted(CoreWebView2 sender, CoreWebView2NavigationCompletedEventArgs args) + { + await SetThemeAsync(); + IsLoading = false; + await SetTextAsync(Text); + + Browser.CoreWebView2.WebMessageReceived += CoreWebView2_WebMessageReceived; + Browser.Focus(FocusState.Programmatic); + } + + private void CoreWebView2_WebMessageReceived(CoreWebView2 sender, CoreWebView2WebMessageReceivedEventArgs args) + { + var json = JsonNode.Parse(args.WebMessageAsJson); + if (json == null) + { + return; + } + + var id = json["id"]; + if (id == null || !id.ToString().Equals("contentChanged", StringComparison.OrdinalIgnoreCase)) + { + return; + } + + var content = json["content"].ToString(); + if (content == null) + { + return; + } + + Text = content; + ThrottleTextChanged(); + } + + private async Task SetThemeAsync() + { + var theme = Application.Current.RequestedTheme == ApplicationTheme.Light ? "vs" : "vs-dark"; + await Browser.CoreWebView2.ExecuteScriptAsync($"monaco.editor.setTheme('{theme}')"); + } + + private void OnTextChangedThrottleElapsed(object sender, ElapsedEventArgs e) + { + if (_textChangedThrottled) + { + _textChangedThrottled = false; + TextChanged?.Invoke(this, EventArgs.Empty); + _textChangedThrottle.Start(); + } + } + + private void ThrottleTextChanged() + { + if (_textChangedThrottle.Enabled) + { + _textChangedThrottled = true; + return; + } + + TextChanged?.Invoke(this, EventArgs.Empty); + _textChangedThrottle.Start(); + } + + public void Dispose() + { + _textChangedThrottle?.Dispose(); + } + } +} diff --git a/src/modules/registrypreview/RegistryPreviewUILib/MonacoHelper.cs b/src/modules/registrypreview/RegistryPreviewUILib/MonacoHelper.cs new file mode 100644 index 0000000000..95305ff2ba --- /dev/null +++ b/src/modules/registrypreview/RegistryPreviewUILib/MonacoHelper.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Reflection; + +namespace RegistryPreviewUILib +{ + public static class MonacoHelper + { + /// + /// Name of the virtual host + /// + public const string VirtualHostName = "PowerToysLocalMonaco"; + + public static string TempFolderPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @"AppData\LocalLow\Microsoft\PowerToys\RegistryPreview-Temp"); + + private static string _monacoDirectory; + + public static string GetRuntimeMonacoDirectory() + { + string codeBase = Assembly.GetExecutingAssembly().Location; + string path = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(codeBase) ?? string.Empty, "Assets", "Monaco")); + if (Path.Exists(path)) + { + return path; + } + else + { + // We're likely in WinUI3Apps directory and need to go back to the base directory. + return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(codeBase) ?? string.Empty, "..", "Assets", "Monaco")); + } + } + + public static string MonacoDirectory + { + get + { + if (string.IsNullOrEmpty(_monacoDirectory)) + { + _monacoDirectory = GetRuntimeMonacoDirectory(); + } + + return _monacoDirectory; + } + } + } +} diff --git a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Events.cs b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Events.cs index 624b104a01..0df3a5c0f5 100644 --- a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Events.cs +++ b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Events.cs @@ -8,9 +8,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; -using System.Threading.Tasks; using CommunityToolkit.WinUI.UI.Controls; +using Microsoft.UI.Dispatching; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Data; @@ -21,6 +21,8 @@ namespace RegistryPreviewUILib { public sealed partial class RegistryPreviewMainPage : Page { + private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread(); + /// /// Event that is will prevent the app from closing if the "save file" flag is active /// @@ -40,43 +42,25 @@ namespace RegistryPreviewUILib resourceLoader.GetString("YesNoCancelDialogSecondaryButtonText"), resourceLoader.GetString("YesNoCancelDialogCloseButtonText")); } - - // Check to see if the textbox's context menu is open - if (textBox.ContextFlyout != null && textBox.ContextFlyout.IsOpen) - { - textBox.ContextFlyout.Hide(); - - // if true, the app will not close yet - args.Handled = true; - - // HACK: To fix https://github.com/microsoft/PowerToys/issues/28820, wait a bit for the close animation of the flyout to run before closing the application. - // This might be called many times if the flyout still hasn't been closed, as Window_Closed will be called again by App.Current.Exit - DispatcherQueue.TryEnqueue(async () => - { - await Task.Delay(100); - Application.Current.Exit(); - }); - return; - } } /// /// Event that gets fired after the visual tree has been fully loaded; the app opens the reg file from here so it can show a message box successfully /// - private void GridPreview_Loaded(object sender, RoutedEventArgs e) + private async void GridPreview_Loaded(object sender, RoutedEventArgs e) { // static flag to track whether the Visual Tree is ready - if the main Grid has been loaded, the tree is ready. visualTreeReady = true; // Check to see if the REG file was opened and parsed successfully - if (OpenRegistryFile(_appFileName) == false) + if (await OpenRegistryFile(_appFileName) == false) { if (File.Exists(_appFileName)) { // Allow Refresh and Edit to be enabled because a broken Reg file might be fixable UpdateToolBarAndUI(false, true, true); _updateWindowTitleFunction(resourceLoader.GetString("InvalidRegistryFileTitle")); - textBox.TextChanged += TextBox_TextChanged; + MonacoEditor.TextChanged += MonacoEditor_TextChanged; return; } else @@ -87,10 +71,10 @@ namespace RegistryPreviewUILib } else { - textBox.TextChanged += TextBox_TextChanged; + MonacoEditor.TextChanged += MonacoEditor_TextChanged; } - textBox.Focus(FocusState.Programmatic); + MonacoEditor.Focus(FocusState.Programmatic); } /// @@ -153,16 +137,15 @@ namespace RegistryPreviewUILib if (storageFile != null) { // mute the TextChanged handler to make for clean UI - textBox.TextChanged -= TextBox_TextChanged; - + MonacoEditor.TextChanged -= MonacoEditor_TextChanged; _appFileName = storageFile.Path; - UpdateToolBarAndUI(OpenRegistryFile(_appFileName)); + UpdateToolBarAndUI(await OpenRegistryFile(_appFileName)); // disable the Save button as it's a new file saveButton.IsEnabled = false; // Restore the event handler as we're loaded - textBox.TextChanged += TextBox_TextChanged; + MonacoEditor.TextChanged += MonacoEditor_TextChanged; } } @@ -177,7 +160,7 @@ namespace RegistryPreviewUILib /// /// Uses a picker to save out a copy of the current reg file /// - private void SaveAsButton_Click(object sender, RoutedEventArgs e) + private async void SaveAsButton_Click(object sender, RoutedEventArgs e) { // Save out a new REG file and then open it - we have to use the direct Win32 method because FileOpenPicker crashes when it's // called while running as admin @@ -195,24 +178,24 @@ namespace RegistryPreviewUILib _appFileName = filename; SaveFile(); - UpdateToolBarAndUI(OpenRegistryFile(_appFileName)); + UpdateToolBarAndUI(await OpenRegistryFile(_appFileName)); } /// /// Reloads the current REG file from storage /// - private void RefreshButton_Click(object sender, RoutedEventArgs e) + private async void RefreshButton_Click(object sender, RoutedEventArgs e) { // mute the TextChanged handler to make for clean UI - textBox.TextChanged -= TextBox_TextChanged; + MonacoEditor.TextChanged -= MonacoEditor_TextChanged; // reload the current Registry file and update the toolbar accordingly. - UpdateToolBarAndUI(OpenRegistryFile(_appFileName), true, true); + UpdateToolBarAndUI(await OpenRegistryFile(_appFileName), true, true); saveButton.IsEnabled = false; // restore the TextChanged handler - textBox.TextChanged += TextBox_TextChanged; + MonacoEditor.TextChanged += MonacoEditor_TextChanged; } /// @@ -364,12 +347,15 @@ namespace RegistryPreviewUILib } /// - /// When the text in textBox changes, reload treeView and possibly dataGrid and reset the save button + /// When the text in editor changes, reload treeView and possibly dataGrid and reset the save button /// - private void TextBox_TextChanged(object sender, TextChangedEventArgs e) + private void MonacoEditor_TextChanged(object sender, EventArgs e) { - RefreshRegistryFile(); - saveButton.IsEnabled = true; + _dispatcherQueue.TryEnqueue(() => + { + RefreshRegistryFile(); + saveButton.IsEnabled = true; + }); } } } diff --git a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Utilities.cs b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Utilities.cs index 6c85c08ddf..daae306006 100644 --- a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Utilities.cs +++ b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Utilities.cs @@ -11,7 +11,8 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text; - +using System.Threading; +using System.Threading.Tasks; using Microsoft.UI.Input; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; @@ -21,12 +22,14 @@ namespace RegistryPreviewUILib { public sealed partial class RegistryPreviewMainPage : Page { + private static SemaphoreSlim _dialogSemaphore = new(1); + public delegate void UpdateWindowTitleFunction(string title); /// /// Method that opens and processes the passed in file name; expected to be an absolute path and a first time open /// - private bool OpenRegistryFile(string filename) + private async Task OpenRegistryFile(string filename) { // clamp to prevent attempts to open a file larger than 10MB try @@ -46,7 +49,7 @@ namespace RegistryPreviewUILib // Disable parts of the UI that can cause trouble when loading ChangeCursor(gridPreview, true); - textBox.Text = string.Empty; + await MonacoEditor.SetTextAsync(string.Empty); // clear the treeView and dataGrid no matter what treeView.RootNodes.Clear(); @@ -55,7 +58,7 @@ namespace RegistryPreviewUILib // update the current window's title with the current filename _updateWindowTitleFunction(filename); - // Load in the whole file in one call and plop it all into textBox + // Load in the whole file in one call and plop it all into editor FileStream fileStream = null; try { @@ -68,15 +71,15 @@ namespace RegistryPreviewUILib StreamReader streamReader = new StreamReader(fileStream); string filenameText = streamReader.ReadToEnd(); - textBox.Text = filenameText; + await MonacoEditor.SetTextAsync(filenameText); streamReader.Close(); } catch { // restore TextChanged handler to make for clean UI - textBox.TextChanged += TextBox_TextChanged; + MonacoEditor.TextChanged += MonacoEditor_TextChanged; - // Reset the cursor but leave textBox disabled as no content got loaded + // Reset the cursor but leave editor disabled as no content got loaded ChangeCursor(gridPreview, false); return false; } @@ -89,8 +92,8 @@ namespace RegistryPreviewUILib } } - // now that the file is loaded and in textBox, parse the data - ParseRegistryFile(textBox.Text); + // now that the file is loaded and in editor, parse the data + ParseRegistryFile(MonacoEditor.Text); // Getting here means that the entire REG file was parsed without incident // so select the root of the tree and celebrate @@ -120,8 +123,8 @@ namespace RegistryPreviewUILib treeView.RootNodes.Clear(); ClearTable(); - // the existing text is still in textBox so parse the data again - ParseRegistryFile(textBox.Text); + // the existing text is still in editor so parse the data again + ParseRegistryFile(MonacoEditor.Text); // check to see if there was a key in treeView before the refresh happened if (currentNode != null) @@ -164,7 +167,7 @@ namespace RegistryPreviewUILib } /// - /// Parses the text that is passed in, which should be the same text that's in textBox + /// Parses the text that is passed in, which should be the same text that's in editor /// private bool ParseRegistryFile(string filenameText) { @@ -181,10 +184,10 @@ namespace RegistryPreviewUILib // As we'll be processing the text one line at a time, this string will be the current line string registryLine; - // Brute force editing: for textBox to show Cr-Lf corrected, we need to strip out the \n's + // Brute force editing: for editor to show Cr-Lf corrected, we need to strip out the \n's filenameText = filenameText.Replace("\r\n", "\r"); - // split apart all of the text in textBox, where one element in the array represents one line + // split apart all of the text in editor, where one element in the array represents one line string[] registryLines = filenameText.Split("\r"); if (registryLines.Length <= 1) { @@ -655,8 +658,8 @@ namespace RegistryPreviewUILib } /// - /// Enable command bar buttons and textBox. - /// Note that writeButton and textBox all update with the same value on purpose + /// Enable command bar buttons + /// Note that writeButton and editor all update with the same value on purpose /// private void UpdateToolBarAndUI(bool enableWrite, bool enableRefresh, bool enableEdit) { @@ -776,21 +779,34 @@ namespace RegistryPreviewUILib /// private async void ShowMessageBox(string title, string content, string closeButtonText) { - ContentDialog contentDialog = new ContentDialog() + if (_dialogSemaphore.CurrentCount == 0) { - Title = title, - Content = content, - CloseButtonText = closeButtonText, - }; - - // Use this code to associate the dialog to the appropriate AppWindow by setting - // the dialog's XamlRoot to the same XamlRoot as an element that is already present in the AppWindow. - if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8)) - { - contentDialog.XamlRoot = this.Content.XamlRoot; + return; } - await contentDialog.ShowAsync(); + try + { + await _dialogSemaphore.WaitAsync(); + ContentDialog contentDialog = new ContentDialog() + { + Title = title, + Content = content, + CloseButtonText = closeButtonText, + }; + + // Use this code to associate the dialog to the appropriate AppWindow by setting + // the dialog's XamlRoot to the same XamlRoot as an element that is already present in the AppWindow. + if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8)) + { + contentDialog.XamlRoot = this.Content.XamlRoot; + } + + await contentDialog.ShowAsync(); + } + finally + { + _dialogSemaphore.Release(); + } } /// @@ -894,7 +910,7 @@ namespace RegistryPreviewUILib } /// - /// Wrapper method that saves the current file in place, using the current text in textBox. + /// Wrapper method that saves the current file in place, using the current text in editor. /// private void SaveFile() { @@ -914,8 +930,8 @@ namespace RegistryPreviewUILib fileStream = new FileStream(_appFileName, fileStreamOptions); StreamWriter streamWriter = new StreamWriter(fileStream, System.Text.Encoding.Unicode); - // if we get here, the file is open and writable so dump the whole contents of textBox - string filenameText = textBox.Text; + // if we get here, the file is open and writable so dump the whole contents of editor + string filenameText = MonacoEditor.Text; streamWriter.Write(filenameText); streamWriter.Flush(); streamWriter.Close(); diff --git a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.xaml b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.xaml index f5e0c6ee1a..058663459e 100644 --- a/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.xaml +++ b/src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.xaml @@ -3,6 +3,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="using:RegistryPreviewUILib" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls" xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls" @@ -133,28 +134,12 @@ - + IsTabStop="True" /> + Library @@ -39,6 +40,12 @@ + + + + + + @@ -52,4 +59,10 @@ Always + + + + MSBuild:Compile + + diff --git a/src/modules/registrypreview/RegistryPreviewUILib/Strings/en-US/Resources.resw b/src/modules/registrypreview/RegistryPreviewUILib/Strings/en-US/Resources.resw index d637b2e187..580d108d9a 100644 --- a/src/modules/registrypreview/RegistryPreviewUILib/Strings/en-US/Resources.resw +++ b/src/modules/registrypreview/RegistryPreviewUILib/Strings/en-US/Resources.resw @@ -199,9 +199,6 @@ New Registry file - - Registry file text will appear here - Registry Preview From 133aa85f2bb23d7f45b5fde9767e56cac476a025 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:04:32 +0200 Subject: [PATCH 53/54] [General]Add an option for telemetry opt-in and visualization(#34078) * Data diagnostics opt-in * [c++] Drop DROP_PII flag * Bump telemtry package to 2.0.2 * Drop DropPii from custom actions * Cleanup * Do not start manually C# EtwTrace. FZ engine exit event. * ImageResizer, PowerRename, FileLocksmith prev handlers * Revert C# handlers exe logging * Revert "Revert C# handlers exe logging" This reverts commit 4c75a3953b085aeffaefe8e9e20c39cebb899ea1. * Do not recreate EtwTrace * consume package * xaml formatting * Fix deps.json audit * Update telem package paths * Address PR comments * Fix AdvancedPaste close on PT close * Override etl file name for explorer loaded dlls Start/stop tracer when needed for explorer loaded dlls to prevent explorer overload * Fix setting desc * Fix missing events * Add infobar to restart when enable data viewing * Flush on timer every 30s * [Settings] Update View Data diagnostic description text [New+] Add tracer * Show Restart info bar for both enable/disable data viewer * Fix newplus * Fix stuck on restart and terminate AdvPaste exe on destroy() * [Installer] Add tracer * Address PR comment * Add missing tracers * Exclude etw dir from BugReport * Fix bad merge * [Hosts] Proper exit on initial dialog * [OOBE] Make Data diagnostic setting visible without scroll * [OOBE] Add hiperlynk to open general settings * Disable data view on disabling data diagnostics * Don't disable View data button * Fix disabling data viewing * Add missing dot * Revert formatting --- .github/actions/spell-check/expect.txt | 27 +- .pipelines/packages.config | 2 +- .pipelines/v2/release.yml | 4 +- Directory.Packages.props | 1 + NOTICE.md | 1 + PowerToys.sln | 16 + installer/PowerToysSetup.sln | 10 + .../CustomAction.cpp | 73 ++++- .../PowerToysSetupCustomActions.vcxproj | 3 + src/common/GPOWrapper/GPOWrapper.cpp | 4 + src/common/GPOWrapper/GPOWrapper.h | 1 + src/common/GPOWrapper/GPOWrapper.idl | 1 + .../Telemetry/DataDiagnosticsSettings.cs | 107 ++++++ .../ManagedTelemetry/Telemetry/EtwTrace.cs | 158 +++++++++ .../Telemetry/ManagedTelemetry.csproj | 6 +- .../Telemetry/PowerToysTelemetry.cs | 19 +- src/common/SettingsAPI/settings_helpers.cpp | 34 +- src/common/SettingsAPI/settings_helpers.h | 2 + src/common/Telemetry/EtwTrace/EtwTrace.cpp | 310 ++++++++++++++++++ src/common/Telemetry/EtwTrace/EtwTrace.h | 54 +++ .../Telemetry/EtwTrace/EtwTrace.vcxproj | 51 +++ .../EtwTrace/EtwTrace.vcxproj.filters | 39 +++ src/common/Telemetry/EtwTrace/packages.config | 5 + src/common/Telemetry/EtwTrace/pch.cpp | 5 + src/common/Telemetry/EtwTrace/pch.h | 23 ++ src/common/Telemetry/TraceBase.h | 63 ++++ src/common/interop/Constants.cpp | 24 ++ src/common/interop/Constants.h | 6 + src/common/interop/Constants.idl | 6 + src/common/interop/shared_constants.h | 18 + src/common/utils/EventWaiter.h | 2 + src/common/utils/gpo.h | 6 + src/gpo/assets/PowerToys.admx | 13 +- src/gpo/assets/en-US/PowerToys.adml | 10 +- .../AdvancedPasteXAML/App.xaml.cs | 15 +- .../AdvancedPasteXAML/MainWindow.xaml.cs | 2 + .../AdvancedPasteModuleInterface/dllmain.cpp | 21 +- .../AdvancedPasteModuleInterface/pch.h | 1 - .../AdvancedPasteModuleInterface/trace.cpp | 18 +- .../AdvancedPasteModuleInterface/trace.h | 6 +- .../CropAndLock/CropAndLock.vcxproj | 3 + .../CropAndLock/CropAndLock.vcxproj.filters | 1 + src/modules/CropAndLock/CropAndLock/main.cpp | 35 +- src/modules/CropAndLock/CropAndLock/pch.h | 1 - src/modules/CropAndLock/CropAndLock/trace.cpp | 27 +- src/modules/CropAndLock/CropAndLock/trace.h | 7 +- .../CropAndLockModuleInterface/dllmain.cpp | 4 +- .../CropAndLockModuleInterface/pch.h | 2 - .../EnvironmentVariablesXAML/App.xaml.cs | 2 + .../EnvironmentVariablesXAML/MainWindow.xaml | 3 +- .../MainWindow.xaml.cs | 5 + .../EnvironmentVariablesModuleInterface/pch.h | 1 - .../trace.cpp | 16 +- .../trace.h | 7 +- .../FileLocksmithContextMenu.vcxproj | 3 + .../FileLocksmithContextMenu.vcxproj.filters | 3 +- .../FileLocksmithContextMenu/dllmain.cpp | 15 + .../FileLocksmithExt/ExplorerCommand.cpp | 14 + .../FileLocksmithExt/ExplorerCommand.h | 4 + .../FileLocksmithExt/FileLocksmithExt.vcxproj | 3 + .../FileLocksmith/FileLocksmithLib/Trace.cpp | 21 +- .../FileLocksmith/FileLocksmithLib/Trace.h | 6 +- .../Hosts/Hosts/Helpers/NativeEventWaiter.cs | 30 ++ src/modules/Hosts/Hosts/HostsXAML/App.xaml.cs | 11 +- .../Hosts/Hosts/HostsXAML/MainWindow.xaml | 3 +- .../Hosts/Hosts/HostsXAML/MainWindow.xaml.cs | 5 + .../Hosts/HostsModuleInterface/dllmain.cpp | 15 + src/modules/Hosts/HostsModuleInterface/pch.h | 1 - .../Hosts/HostsModuleInterface/trace.cpp | 16 +- .../Hosts/HostsModuleInterface/trace.h | 7 +- .../Hosts/HostsUILib/HostsMainPage.xaml.cs | 2 +- .../PowerToys.MeasureToolCore.cpp | 7 + .../PowerToys.MeasureToolCore.h | 2 + .../PowerToys.MeasureToolCore.vcxproj | 3 + src/modules/MeasureTool/MeasureToolCore/pch.h | 1 - .../MeasureToolModuleInterface/pch.h | 1 - .../MeasureToolModuleInterface/trace.cpp | 18 +- .../MeasureToolModuleInterface/trace.h | 7 +- src/modules/MouseUtils/FindMyMouse/pch.h | 1 - src/modules/MouseUtils/FindMyMouse/trace.cpp | 16 +- src/modules/MouseUtils/FindMyMouse/trace.h | 7 +- src/modules/MouseUtils/MouseHighlighter/pch.h | 1 - .../MouseUtils/MouseHighlighter/trace.cpp | 16 +- .../MouseUtils/MouseHighlighter/trace.h | 7 +- src/modules/MouseUtils/MouseJump/pch.h | 1 - src/modules/MouseUtils/MouseJump/trace.cpp | 16 +- src/modules/MouseUtils/MouseJump/trace.h | 7 +- .../MouseUtils/MousePointerCrosshairs/pch.h | 1 - .../MousePointerCrosshairs/trace.cpp | 16 +- .../MouseUtils/MousePointerCrosshairs/trace.h | 7 +- .../App/Class/Common.ShutdownWithPowerToys.cs | 6 +- .../MouseWithoutBorders/App/Class/Program.cs | 6 +- .../MouseWithoutBorders/App/Helper/Program.cs | 6 + .../ModuleInterface/dllmain.cpp | 4 +- .../MouseWithoutBorders/ModuleInterface/pch.h | 2 - .../ModuleInterface/trace.cpp | 20 +- .../ModuleInterface/trace.h | 7 +- .../NewShellExtensionContextMenu.vcxproj | 3 + .../NewShellExtensionContextMenu/dll_main.cpp | 3 + .../NewShellExtensionContextMenu/dll_main.h | 5 +- .../shell_context_sub_menu.cpp | 1 + .../shell_context_sub_menu_item.cpp | 12 +- .../NewShellExtensionContextMenu/trace.cpp | 20 +- .../NewShellExtensionContextMenu/trace.h | 6 +- src/modules/PowerOCR/PowerOCR/App.xaml.cs | 12 +- .../PowerOCRModuleInterface/dllmain.cpp | 5 + .../PowerOCR/PowerOCRModuleInterface/pch.h | 1 - .../PowerOCRModuleInterface/trace.cpp | 14 +- .../PowerOCR/PowerOCRModuleInterface/trace.h | 8 +- .../ShortcutGuide/ShortcutGuide.vcxproj | 3 + .../ShortcutGuide/ShortcutGuide/main.cpp | 7 + src/modules/ShortcutGuide/ShortcutGuide/pch.h | 1 - .../ShortcutGuide/ShortcutGuide/trace.cpp | 16 +- .../ShortcutGuide/ShortcutGuide/trace.h | 6 +- .../ShortcutGuideModuleInterface/pch.h | 1 - .../Workspaces/WorkspacesEditor/App.xaml.cs | 4 + .../WorkspacesEditor/MainWindow.xaml.cs | 1 + .../WorkspacesLauncher.vcxproj | 3 + .../Workspaces/WorkspacesLauncher/main.cpp | 29 +- .../Workspaces/WorkspacesLib/trace.cpp | 14 +- src/modules/Workspaces/WorkspacesLib/trace.h | 7 +- .../WorkspacesModuleInterface/dllmain.cpp | 4 +- .../alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp | 22 +- .../alwaysontop/AlwaysOnTop/AlwaysOnTop.h | 4 +- .../AlwaysOnTop/AlwaysOnTop.vcxproj | 3 + src/modules/alwaysontop/AlwaysOnTop/main.cpp | 19 +- src/modules/alwaysontop/AlwaysOnTop/pch.h | 1 - src/modules/alwaysontop/AlwaysOnTop/trace.cpp | 18 +- src/modules/alwaysontop/AlwaysOnTop/trace.h | 7 +- .../AlwaysOnTopModuleInterface/dllmain.cpp | 12 +- .../AlwaysOnTopModuleInterface/pch.h | 2 - src/modules/awake/Awake/Program.cs | 3 + src/modules/awake/AwakeModuleInterface/pch.h | 1 - .../awake/AwakeModuleInterface/trace.cpp | 14 +- .../awake/AwakeModuleInterface/trace.h | 7 +- .../CmdNotFoundModuleInterface/pch.h | 2 - .../CmdNotFoundModuleInterface/trace.cpp | 14 +- .../CmdNotFoundModuleInterface/trace.h | 7 +- .../colorPicker/ColorPicker/dllmain.cpp | 7 + src/modules/colorPicker/ColorPicker/pch.h | 1 - src/modules/colorPicker/ColorPicker/trace.cpp | 14 +- src/modules/colorPicker/ColorPicker/trace.h | 8 +- .../colorPicker/ColorPickerUI/App.xaml.cs | 4 + .../ColorPickerUI/ColorEditorWindow.xaml.cs | 1 - .../ColorPickerUI/ViewModels/MainViewModel.cs | 6 + .../fancyzones/FancyZones/FancyZones.vcxproj | 3 + .../fancyzones/FancyZones/FancyZonesApp.cpp | 11 +- .../fancyzones/FancyZones/FancyZonesApp.h | 6 +- src/modules/fancyzones/FancyZones/main.cpp | 9 +- src/modules/fancyzones/FancyZones/pch.h | 1 - src/modules/fancyzones/FancyZonesLib/pch.h | 2 - .../fancyzones/FancyZonesLib/trace.cpp | 40 +-- src/modules/fancyzones/FancyZonesLib/trace.h | 11 +- .../FancyZonesModuleInterface/dllmain.cpp | 3 +- .../FancyZonesModuleInterface/pch.h | 2 - .../UnitTests/UnitTests.vcxproj | 4 +- .../ImageResizerContextMenu.vcxproj | 3 + .../ImageResizerContextMenu/dllmain.cpp | 6 + .../imageresizer/ImageResizerLib/pch.h | 2 - .../imageresizer/ImageResizerLib/trace.cpp | 21 +- .../imageresizer/ImageResizerLib/trace.h | 6 +- .../imageresizer/dll/ContextMenuHandler.cpp | 17 + .../imageresizer/dll/ContextMenuHandler.h | 2 + .../imageresizer/dll/ImageResizerExt.vcxproj | 9 +- src/modules/imageresizer/dll/pch.h | 1 - .../KeyboardManagerEditor.cpp | 1 - .../KeyboardManagerEditor.vcxproj | 3 + .../EditKeyboardWindow.cpp | 6 + .../EditShortcutsWindow.cpp | 6 + .../KeyboardManagerEditorLibrary/pch.h | 2 - .../KeyboardManagerEditorLibrary/trace.cpp | 20 +- .../KeyboardManagerEditorLibrary/trace.h | 7 +- .../KeyboardManagerEditorTest/pch.h | 1 - .../KeyboardManagerEngine.vcxproj | 3 + .../KeyboardManagerEngine/main.cpp | 16 +- .../KeyboardManagerEngine/pch.h | 1 - .../KeyboardManagerEngineLibrary/pch.h | 1 - .../KeyboardManagerEngineLibrary/trace.cpp | 118 +++---- .../KeyboardManagerEngineLibrary/trace.h | 7 +- .../KeyboardManagerEngineTest/pch.h | 1 - src/modules/keyboardmanager/common/pch.h | 1 - src/modules/keyboardmanager/dll/dllmain.cpp | 17 + src/modules/keyboardmanager/dll/pch.h | 1 - src/modules/keyboardmanager/dll/trace.cpp | 14 +- src/modules/keyboardmanager/dll/trace.h | 7 +- .../Microsoft.Launcher.vcxproj | 5 +- .../Microsoft.Launcher.vcxproj.filters | 2 - .../launcher/Microsoft.Launcher/dllmain.cpp | 3 - src/modules/launcher/Microsoft.Launcher/pch.h | 1 - .../launcher/Microsoft.Launcher/trace.cpp | 17 - .../launcher/Microsoft.Launcher/trace.h | 7 - .../launcher/PowerLauncher/App.xaml.cs | 5 + src/modules/peek/Peek.UI/PeekXAML/App.xaml.cs | 8 + src/modules/peek/peek/dllmain.cpp | 12 +- src/modules/peek/peek/pch.h | 1 - src/modules/peek/peek/trace.cpp | 18 +- src/modules/peek/peek/trace.h | 7 +- .../poweraccent/PowerAccent.UI/App.xaml.cs | 3 + .../PowerAccentModuleInterface/pch.h | 1 - .../PowerAccentModuleInterface/trace.cpp | 14 +- .../PowerAccentModuleInterface/trace.h | 7 +- .../PowerRenameContextMenu.vcxproj | 3 + .../PowerRenameContextMenu/dllmain.cpp | 7 + .../PowerRenameUILib/PowerRenameUI.vcxproj | 3 + .../PowerRenameUI.vcxproj.filters | 3 - .../PowerRenameXAML/MainWindow.xaml.cpp | 11 + .../PowerRenameXAML/MainWindow.xaml.h | 4 + .../powerrename/dll/PowerRenameExt.cpp | 10 + src/modules/powerrename/dll/PowerRenameExt.h | 4 + .../powerrename/dll/PowerRenameExt.vcxproj | 3 + src/modules/powerrename/lib/pch.h | 2 - src/modules/powerrename/lib/trace.cpp | 34 +- src/modules/powerrename/lib/trace.h | 6 +- .../GcodePreviewHandlerControl.cs | 17 - .../Events/GcodeFileHandlerLoaded.cs | 21 -- .../Telemetry/Events/GcodeFilePreviewError.cs | 26 -- .../Telemetry/Events/GcodeFilePreviewed.cs | 21 -- .../MarkdownPreviewHandlerControl.cs | 20 +- .../Events/MarkdownFileHandlerLoaded.cs | 21 -- .../Events/MarkdownFilePreviewError.cs | 23 -- .../Telemetry/Events/MarkdownFilePreviewed.cs | 21 -- .../PdfPreviewHandlerControl.cs | 27 +- .../Telemetry/Events/PdfFileHandlerLoaded.cs | 21 -- .../Telemetry/Events/PdfFilePreviewError.cs | 23 -- .../Telemetry/Events/PdfFilePreviewed.cs | 21 -- .../QoiPreviewHandlerControl.cs | 17 - .../Telemetry/Events/QoiFilePreviewError.cs | 26 -- .../Telemetry/Events/QoiFilePreviewed.cs | 21 -- .../SvgPreviewHandler/SvgPreviewControl.cs | 27 +- .../Telemetry/Events/SvgFileHandlerLoaded.cs | 21 -- .../Telemetry/Events/SvgFilePreviewError.cs | 26 -- .../Telemetry/Events/SvgFilePreviewed.cs | 21 -- src/modules/previewpane/powerpreview/pch.h | 1 - .../previewpane/powerpreview/powerpreview.cpp | 1 - .../previewpane/powerpreview/trace.cpp | 27 +- src/modules/previewpane/powerpreview/trace.h | 6 +- .../RegistryPreview/MainWindow.Events.cs | 1 + .../RegistryPreviewXAML/App.xaml.cs | 3 + .../RegistryPreviewExt/Trace.cpp | 16 +- .../RegistryPreviewExt/Trace.h | 7 +- .../registrypreview/RegistryPreviewExt/pch.h | 1 - .../VideoConferenceModule/pch.h | 2 - .../VideoConferenceModule/trace.cpp | 20 +- .../VideoConferenceModule/trace.h | 6 +- src/runner/general_settings.cpp | 5 +- src/runner/main.cpp | 15 + src/runner/pch.h | 1 - src/runner/runner.vcxproj | 3 + src/runner/settings_window.cpp | 4 + src/runner/trace.cpp | 16 +- src/runner/trace.h | 6 +- .../Settings.UI/Helpers/ETLConverter.cs | 102 ++++++ .../Settings.UI/Helpers/NativeEventWaiter.cs | 30 ++ .../Settings.UI/Helpers/StartProcessHelper.cs | 1 + .../Settings.UI/SettingsXAML/App.xaml.cs | 9 + .../SettingsXAML/OOBE/Views/OobeOverview.xaml | 31 ++ .../OOBE/Views/OobeOverview.xaml.cs | 49 +++ .../SettingsXAML/OOBE/Views/OobeWhatsNew.xaml | 56 +++- .../OOBE/Views/OobeWhatsNew.xaml.cs | 93 ++++++ .../SettingsXAML/Views/GeneralPage.xaml | 50 +++ .../SettingsXAML/Views/GeneralPage.xaml.cs | 29 +- .../Settings.UI/Strings/en-us/Resources.resw | 80 ++++- .../ViewModels/DashboardViewModel.cs | 40 ++- .../ViewModels/GeneralViewModel.cs | 136 ++++++++ tools/BugReportTool/BugReportTool/Main.cpp | 1 + .../BugReportTool/ReportGPOValues.cpp | 6 +- tools/project_template/ModuleTemplate/pch.h | 1 - .../project_template/ModuleTemplate/trace.cpp | 14 +- tools/project_template/ModuleTemplate/trace.h | 6 +- 269 files changed, 2622 insertions(+), 1256 deletions(-) create mode 100644 src/common/ManagedTelemetry/Telemetry/DataDiagnosticsSettings.cs create mode 100644 src/common/ManagedTelemetry/Telemetry/EtwTrace.cs create mode 100644 src/common/Telemetry/EtwTrace/EtwTrace.cpp create mode 100644 src/common/Telemetry/EtwTrace/EtwTrace.h create mode 100644 src/common/Telemetry/EtwTrace/EtwTrace.vcxproj create mode 100644 src/common/Telemetry/EtwTrace/EtwTrace.vcxproj.filters create mode 100644 src/common/Telemetry/EtwTrace/packages.config create mode 100644 src/common/Telemetry/EtwTrace/pch.cpp create mode 100644 src/common/Telemetry/EtwTrace/pch.h create mode 100644 src/common/Telemetry/TraceBase.h create mode 100644 src/modules/Hosts/Hosts/Helpers/NativeEventWaiter.cs delete mode 100644 src/modules/launcher/Microsoft.Launcher/trace.cpp delete mode 100644 src/modules/launcher/Microsoft.Launcher/trace.h delete mode 100644 src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFileHandlerLoaded.cs delete mode 100644 src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewError.cs delete mode 100644 src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewed.cs delete mode 100644 src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFileHandlerLoaded.cs delete mode 100644 src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewError.cs delete mode 100644 src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewed.cs delete mode 100644 src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFileHandlerLoaded.cs delete mode 100644 src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewError.cs delete mode 100644 src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewed.cs delete mode 100644 src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewError.cs delete mode 100644 src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewed.cs delete mode 100644 src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFileHandlerLoaded.cs delete mode 100644 src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewError.cs delete mode 100644 src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewed.cs create mode 100644 src/settings-ui/Settings.UI/Helpers/ETLConverter.cs create mode 100644 src/settings-ui/Settings.UI/Helpers/NativeEventWaiter.cs diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index fa94dd6d7e..e7bcaab1b5 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -43,6 +43,7 @@ AMPROPSETID amr ANDSCANS animatedvisuals +anr ansicolor ANull AOC @@ -57,14 +58,12 @@ APPBARDATA appdata APPEXECLINK Appium -applayout Applicationcan APPLICATIONFRAMEHOST appmanifest APPNAME appref appsettings -appsfolder appwindow appwiz APSTUDIO @@ -145,7 +144,6 @@ BTNFACE bugreport BUILDARCH BUILDNUMBER -buildtask buildtransitive BVal BValue @@ -269,7 +267,6 @@ CSettings cso CSRW CStyle -cswinrt CSY CTest currentculture @@ -351,7 +348,6 @@ devpkey DEVSOURCE DIIRFLAG dimm -directshow DISABLEASACTIONKEY diskmgmt DISPLAYCHANGE @@ -367,7 +363,6 @@ dllmain DNLEN DONOTROUND DONTVALIDATEPATH -DOPUS dotnet DPICHANGED DPIs @@ -450,12 +445,13 @@ erwrite ESettings esrp etl -ETW +etw EUQ eurochange eventlog eventvwr everytime +evntrace evt EWXFORCE EWXFORCEIFHUNG @@ -527,7 +523,6 @@ FZE gacutil Gaeilge Gaidhlig -GBarm GCLP gdi gdiplus @@ -997,7 +992,6 @@ NCRENDERING ndp NEEDDISPATCH needinfo -netcore netcoreapp netcpl netframework @@ -1006,6 +1000,7 @@ netsh newcolor newdev NEWDIALOGSTYLE +NEWFILE newitem newpath newplus @@ -1074,7 +1069,6 @@ NTAPI ntdll ntfs NTSTATUS -nugets nullonfailure numberbox nwc @@ -1225,6 +1219,7 @@ proactively PROCESSENTRY PROCESSKEY processthreadsapi +PROCESSTRACE PRODEXT PRODUCTVERSION Progman @@ -1266,7 +1261,6 @@ PWSTR pwsz pwtd QDC -QDir qianlifeng qit QITAB @@ -1590,9 +1584,7 @@ SYSKEYUP SYSLIB SYSMENU SYSTEMAPPS -SYSTEMSETTINGS SYSTEMTIME -SYSTEMWOW tapp TApplication TApplied @@ -1612,7 +1604,6 @@ TCustom tdbuild TDefault TDevice -telem telephon templatenamespace testprocess @@ -1644,11 +1635,12 @@ toolkitconverters Toolset toolwindow TOPDOWNDIB -TOTALCMD TOUCHEVENTF TOUCHINPUT touchpad +TRACEHANDLE tracelogging +tracerpt trafficmanager traies transicc @@ -1706,11 +1698,9 @@ urlmon Usb USEDEFAULT USEFILEATTRIBUTES -USEPOSITION USERDATA Userenv USESHOWWINDOW -USESIZE USESTDHANDLES USRDLL UType @@ -1803,7 +1793,6 @@ wgpocpl WIC wil winapi -winappdriver wincodec Wincodecsdk wincolor @@ -1867,6 +1856,7 @@ WNDCLASSEX WNDCLASSEXW WNDCLASSW WNDPROC +wnode workarounds WORKSPACESEDITOR WORKSPACESLAUNCHER @@ -1912,7 +1902,6 @@ XNamespace Xoshiro XPels XPixel -xplorer XResource xsi XStr diff --git a/.pipelines/packages.config b/.pipelines/packages.config index a5cab593eb..43fa34c91c 100644 --- a/.pipelines/packages.config +++ b/.pipelines/packages.config @@ -1,4 +1,4 @@ - + diff --git a/.pipelines/v2/release.yml b/.pipelines/v2/release.yml index b4a6a80833..2719777aa6 100644 --- a/.pipelines/v2/release.yml +++ b/.pipelines/v2/release.yml @@ -90,8 +90,8 @@ extends: - script: | call nuget.exe restore -configFile .pipelines/release-nuget.config -PackagesDirectory . .pipelines/packages.config || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1 + move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" || exit /b 1 + move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1 displayName: Emplace telemetry files - stage: Publish diff --git a/Directory.Packages.props b/Directory.Packages.props index 95bc6fa8f1..a103ca59a8 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,6 +28,7 @@ + diff --git a/NOTICE.md b/NOTICE.md index f90b982505..38c961a116 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1320,6 +1320,7 @@ EXHIBIT A -Mozilla Public License. - MessagePack 2.5.187 - Microsoft.CodeAnalysis.NetAnalyzers 8.0.0 - Microsoft.Data.Sqlite 8.0.7 +- Microsoft.Diagnostics.Tracing.TraceEvent 3.1.16 - Microsoft.Extensions.DependencyInjection 8.0.0 - Microsoft.Extensions.Hosting 8.0.0 - Microsoft.Extensions.Hosting.WindowsServices 8.0.0 diff --git a/PowerToys.sln b/PowerToys.sln index fa6b20aacf..80722be402 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -298,6 +298,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Telemetry", "Telemetry", "{ ProjectSection(SolutionItems) = preProject src\common\Telemetry\ProjectTelemetry.h = src\common\Telemetry\ProjectTelemetry.h src\common\Telemetry\TelemetryBase.cs = src\common\Telemetry\TelemetryBase.cs + src\common\Telemetry\TraceBase.h = src\common\Telemetry\TraceBase.h src\common\Telemetry\TraceLoggingDefines.h = src\common\Telemetry\TraceLoggingDefines.h EndProjectSection EndProject @@ -625,6 +626,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesLauncher", "src\m EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspacesWindowArranger", "src\modules\Workspaces\WorkspacesWindowArranger\WorkspacesWindowArranger.vcxproj", "{37D07516-4185-43A4-924F-3C7A5D95ECF6}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EtwTrace", "src\common\Telemetry\EtwTrace\EtwTrace.vcxproj", "{8F021B46-362B-485C-BFBA-CCF83E820CBD}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseWithoutBorders.UnitTests", "src\modules\MouseWithoutBorders\MouseWithoutBorders.UnitTests\MouseWithoutBorders.UnitTests.csproj", "{66614C26-314C-4B91-9071-76133422CFEF}" EndProject Global @@ -2751,6 +2754,18 @@ Global {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x64.Build.0 = Release|x64 {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x86.ActiveCfg = Release|x64 {37D07516-4185-43A4-924F-3C7A5D95ECF6}.Release|x86.Build.0 = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|ARM64.Build.0 = Debug|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x64.ActiveCfg = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x64.Build.0 = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x86.ActiveCfg = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x86.Build.0 = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|ARM64.Build.0 = Release|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x64.ActiveCfg = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x64.Build.0 = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x86.ActiveCfg = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x86.Build.0 = Release|x64 {66614C26-314C-4B91-9071-76133422CFEF}.Debug|ARM64.ActiveCfg = Debug|ARM64 {66614C26-314C-4B91-9071-76133422CFEF}.Debug|ARM64.Build.0 = Debug|ARM64 {66614C26-314C-4B91-9071-76133422CFEF}.Debug|x64.ActiveCfg = Debug|x64 @@ -2992,6 +3007,7 @@ Global {367D7543-7DBA-4381-99F1-BF6142A996C4} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} {2CAC093E-5FCF-4102-9C2C-AC7DD5D9EB96} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} {37D07516-4185-43A4-924F-3C7A5D95ECF6} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF} + {8F021B46-362B-485C-BFBA-CCF83E820CBD} = {8F62026A-294B-41C6-8839-87463613F216} {66614C26-314C-4B91-9071-76133422CFEF} = {B6C42F16-73EB-477E-8B0D-4E6CF6C20AAC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/installer/PowerToysSetup.sln b/installer/PowerToysSetup.sln index cdcef54079..540ef43d23 100644 --- a/installer/PowerToysSetup.sln +++ b/installer/PowerToysSetup.sln @@ -15,6 +15,8 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PowerToysBootstrapper", "Po EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Version", "..\src\common\version\version.vcxproj", "{CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EtwTrace", "..\src\common\Telemetry\EtwTrace\EtwTrace.vcxproj", "{8F021B46-362B-485C-BFBA-CCF83E820CBD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM64 = Debug|ARM64 @@ -68,6 +70,14 @@ Global {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|ARM64.Build.0 = Release|ARM64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.Build.0 = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|ARM64.Build.0 = Debug|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x64.ActiveCfg = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Debug|x64.Build.0 = Debug|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|ARM64.Build.0 = Release|ARM64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x64.ActiveCfg = Release|x64 + {8F021B46-362B-485C-BFBA-CCF83E820CBD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/installer/PowerToysSetupCustomActions/CustomAction.cpp b/installer/PowerToysSetupCustomActions/CustomAction.cpp index 8845208200..8995d2f9b6 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.cpp +++ b/installer/PowerToysSetupCustomActions/CustomAction.cpp @@ -10,6 +10,7 @@ #include "../../src/common/utils/modulesRegistry.h" #include "../../src/common/updating/installer.h" #include "../../src/common/version/version.h" +#include "../../src/common/Telemetry/EtwTrace/EtwTrace.h" #include #include @@ -27,9 +28,9 @@ HINSTANCE DLL_HANDLE = nullptr; TRACELOGGING_DEFINE_PROVIDER( g_hProvider, - "Microsoft.PowerToysInstaller", - // {e1d8165d-5cb6-5c74-3b51-bdfbfe4f7a3b} - (0xe1d8165d, 0x5cb6, 0x5c74, 0x3b, 0x51, 0xbd, 0xfb, 0xfe, 0x4f, 0x7a, 0x3b), + "Microsoft.PowerToys", + // {38e8889b-9731-53f5-e901-e8a7c1753074} + (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0' @@ -38,6 +39,53 @@ const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0' static const wchar_t* POWERTOYS_EXE_COMPONENT = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}"; static const wchar_t* POWERTOYS_UPGRADE_CODE = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}"; +constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys"; +constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnostics"; + +#define TraceLoggingWriteWrapper(provider, eventName, ...) \ + if (isDataDiagnosticEnabled()) \ + { \ + trace.UpdateState(true); \ + TraceLoggingWrite(provider, eventName, __VA_ARGS__); \ + trace.Flush(); \ + trace.UpdateState(false); \ + } + +static Shared::Trace::ETWTrace trace{ L"PowerToys_Installer" }; + +inline bool isDataDiagnosticEnabled() +{ + 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, + DataDiagnosticsRegValueName, + RRF_RT_REG_DWORD, + nullptr, + &isDataDiagnosticsEnabled, + &size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return false; + } + RegCloseKey(key); + + return isDataDiagnosticsEnabled == 1; +} + + HRESULT getInstallFolder(MSIHANDLE hInstall, std::wstring& installationDir) { DWORD len = 0; @@ -793,13 +841,14 @@ UINT __stdcall TelemetryLogInstallSuccessCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogInstallSuccessCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Install_Success", TraceLoggingWideString(get_product_version().c_str(), "Version"), ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE) + ); LExit: er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; @@ -814,7 +863,7 @@ UINT __stdcall TelemetryLogInstallCancelCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogInstallCancelCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Install_Cancel", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -835,7 +884,7 @@ UINT __stdcall TelemetryLogInstallFailCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogInstallFailCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Install_Fail", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -856,7 +905,7 @@ UINT __stdcall TelemetryLogUninstallSuccessCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogUninstallSuccessCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "UnInstall_Success", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -877,7 +926,7 @@ UINT __stdcall TelemetryLogUninstallCancelCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogUninstallCancelCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "UnInstall_Cancel", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -898,7 +947,7 @@ UINT __stdcall TelemetryLogUninstallFailCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogUninstallFailCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "UnInstall_Fail", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -919,7 +968,7 @@ UINT __stdcall TelemetryLogRepairCancelCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogRepairCancelCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Repair_Cancel", TraceLoggingWideString(get_product_version().c_str(), "Version"), @@ -940,7 +989,7 @@ UINT __stdcall TelemetryLogRepairFailCA(MSIHANDLE hInstall) hr = WcaInitialize(hInstall, "TelemetryLogRepairFailCA"); ExitOnFailure(hr, "Failed to initialize"); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Repair_Fail", TraceLoggingWideString(get_product_version().c_str(), "Version"), diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index 959a600706..dee9f63e2b 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -161,6 +161,9 @@ {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + diff --git a/src/common/GPOWrapper/GPOWrapper.cpp b/src/common/GPOWrapper/GPOWrapper.cpp index 817db8c4de..a9ecb43818 100644 --- a/src/common/GPOWrapper/GPOWrapper.cpp +++ b/src/common/GPOWrapper/GPOWrapper.cpp @@ -224,4 +224,8 @@ namespace winrt::PowerToys::GPOWrapper::implementation { return static_cast(powertoys_gpo::getConfiguredNewPlusHideTemplateFilenameExtensionValue()); } + GpoRuleConfigured GPOWrapper::GetAllowDataDiagnosticsValue() + { + return static_cast(powertoys_gpo::getAllowDataDiagnosticsValue()); + } } diff --git a/src/common/GPOWrapper/GPOWrapper.h b/src/common/GPOWrapper/GPOWrapper.h index e1fcb5426b..34c1e3646b 100644 --- a/src/common/GPOWrapper/GPOWrapper.h +++ b/src/common/GPOWrapper/GPOWrapper.h @@ -61,6 +61,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation static GpoRuleConfigured GetConfiguredMwbDisableUserDefinedIpMappingRulesValue(); static winrt::hstring GPOWrapper::GetConfiguredMwbPolicyDefinedIpMappingRules(); static GpoRuleConfigured GetConfiguredNewPlusHideTemplateFilenameExtensionValue(); + static GpoRuleConfigured GetAllowDataDiagnosticsValue(); }; } diff --git a/src/common/GPOWrapper/GPOWrapper.idl b/src/common/GPOWrapper/GPOWrapper.idl index 1d375f1975..af58834a0c 100644 --- a/src/common/GPOWrapper/GPOWrapper.idl +++ b/src/common/GPOWrapper/GPOWrapper.idl @@ -65,6 +65,7 @@ namespace PowerToys static GpoRuleConfigured GetConfiguredMwbDisableUserDefinedIpMappingRulesValue(); static String GetConfiguredMwbPolicyDefinedIpMappingRules(); static GpoRuleConfigured GetConfiguredNewPlusHideTemplateFilenameExtensionValue(); + static GpoRuleConfigured GetAllowDataDiagnosticsValue(); } } } diff --git a/src/common/ManagedTelemetry/Telemetry/DataDiagnosticsSettings.cs b/src/common/ManagedTelemetry/Telemetry/DataDiagnosticsSettings.cs new file mode 100644 index 0000000000..0a9aa7c891 --- /dev/null +++ b/src/common/ManagedTelemetry/Telemetry/DataDiagnosticsSettings.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using Microsoft.Win32; + +namespace Microsoft.PowerToys.Telemetry +{ + public static class DataDiagnosticsSettings + { + private static readonly string DataDiagnosticsRegistryKey = @"HKEY_CURRENT_USER\Software\Classes\PowerToys\"; + private static readonly string DataDiagnosticsRegistryValueName = @"AllowDataDiagnostics"; + private static readonly string DataDiagnosticsDataDiagnosticsUserActionRegistryValueName = @"DataDiagnosticsUserAction"; + private static readonly string DataDiagnosticsDataDiagnosticsViewDataRegistryValueName = @"DataDiagnosticsViewEnabled"; + + public static bool GetEnabledValue() + { + object registryValue = null; + try + { + registryValue = Registry.GetValue(DataDiagnosticsRegistryKey, DataDiagnosticsRegistryValueName, 0); + } + catch + { + } + + if (registryValue is not null) + { + return (int)registryValue == 1 ? true : false; + } + + return false; + } + + public static void SetEnabledValue(bool value) + { + try + { + Registry.SetValue(DataDiagnosticsRegistryKey, DataDiagnosticsRegistryValueName, value ? 1 : 0); + } + catch (Exception) + { + } + } + + public static bool GetUserActionValue() + { + object registryValue = null; + try + { + registryValue = Registry.GetValue(DataDiagnosticsRegistryKey, DataDiagnosticsDataDiagnosticsUserActionRegistryValueName, 0); + } + catch + { + } + + if (registryValue is not null) + { + return (int)registryValue == 1 ? true : false; + } + + return false; + } + + public static void SetUserActionValue(bool value) + { + try + { + Registry.SetValue(DataDiagnosticsRegistryKey, DataDiagnosticsDataDiagnosticsUserActionRegistryValueName, value ? 1 : 0); + } + catch (Exception) + { + } + } + + public static bool GetViewEnabledValue() + { + object registryValue = null; + try + { + registryValue = Registry.GetValue(DataDiagnosticsRegistryKey, DataDiagnosticsDataDiagnosticsViewDataRegistryValueName, 0); + } + catch + { + } + + if (registryValue is not null) + { + return (int)registryValue == 1 ? true : false; + } + + return false; + } + + public static void SetViewEnabledValue(bool value) + { + try + { + Registry.SetValue(DataDiagnosticsRegistryKey, DataDiagnosticsDataDiagnosticsViewDataRegistryValueName, value ? 1 : 0); + } + catch (Exception) + { + } + } + } +} diff --git a/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs b/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs new file mode 100644 index 0000000000..d1d3ec2456 --- /dev/null +++ b/src/common/ManagedTelemetry/Telemetry/EtwTrace.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics; +using System.Diagnostics.Tracing; +using System.Globalization; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Diagnostics.Tracing.Session; + +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 PowerToys processes so that end users + /// can view them if they want. + /// + public class ETWTrace : IDisposable + { + internal const EventKeywords TelemetryKeyword = (EventKeywords)0x0000200000000000; + internal const EventKeywords MeasuresKeyword = (EventKeywords)0x0000400000000000; + internal const EventKeywords CriticalDataKeyword = (EventKeywords)0x0000800000000000; + + private readonly bool telemetryEnabled = DataDiagnosticsSettings.GetEnabledValue(); // This is the global telemetry setting on whether to log events + private readonly bool telemetryRecordingEnabled = DataDiagnosticsSettings.GetViewEnabledValue(); // This is the setting for recording telemetry events to disk for viewing + private readonly string etwFolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Microsoft\PowerToys\", "etw"); + private bool disposedValue; + private string sessionName; + private string etwFilePath; + private bool started; +#nullable enable + private TraceEventSession? traceSession; + + internal sealed class Lister : EventListener + { + public Lister() + : base() + { + } + } + + private Lister? listener; +#nullable disable + + /// + /// Initializes a new instance of the class. + /// + public ETWTrace() + { + if (File.Exists(etwFolderPath)) + { + File.Delete(etwFolderPath); + } + + if (!Directory.Exists(etwFolderPath)) + { + Directory.CreateDirectory(etwFolderPath); + } + + if (this.telemetryEnabled && this.telemetryRecordingEnabled) + { + this.Start(); + } + + listener = new Lister(); + listener.EnableEvents(PowerToysTelemetry.Log, EventLevel.LogAlways); + } + + /// + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + this.Dispose(disposing: true); + GC.SuppressFinalize(this); + } + + /// + /// Starts the trace session. + /// + public void Start() + { + lock (this) + { + if (this.started) + { + return; + } + + new Task(() => + { + while (true) + { + Thread.Sleep(30 * 1000); + + this.traceSession.Flush(); + } + }).Start(); + + string executable = Process.GetCurrentProcess().ProcessName; + string dateTimeNow = DateTime.Now.ToString("MM-d-yyyy__H_mm_ss", CultureInfo.InvariantCulture); + this.sessionName = string.Format(CultureInfo.InvariantCulture, "{0}-{1}-{2}", executable, Environment.ProcessId, dateTimeNow); + this.etwFilePath = Path.Combine(etwFolderPath, $"{this.sessionName}.etl"); + + this.traceSession = new TraceEventSession( + this.sessionName, this.etwFilePath, (TraceEventSessionOptions)(TraceEventSessionOptions.Create | TraceEventSessionOptions.PrivateLogger | TraceEventSessionOptions.PrivateInProcLogger)); + TraceEventProviderOptions args = new TraceEventProviderOptions(); + + this.traceSession.EnableProvider( + PowerToysTelemetry.Log.Guid, + matchAnyKeywords: (ulong)TelemetryKeyword | (ulong)MeasuresKeyword | (ulong)CriticalDataKeyword); + + this.started = true; + } + } + + /// + /// Stops the trace session. + /// + public void Stop() + { + lock (this) + { + if (!this.started) + { + return; + } + + if (this.traceSession != null) + { + Trace.TraceInformation("Disposing EventTraceSession"); + this.traceSession.Dispose(); + this.traceSession = null; + this.started = false; + } + } + } + + /// + /// Disposes the object. + /// + /// boolean for disposing. + protected virtual void Dispose(bool disposing) + { + if (!this.disposedValue) + { + if (disposing) + { + this.Stop(); + } + + this.disposedValue = true; + } + } + } +} diff --git a/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj b/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj index 504301516d..3929c60618 100644 --- a/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj +++ b/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj @@ -1,7 +1,7 @@  - + PowerToys Telemetry PowerToys.ManagedTelemetry @@ -11,4 +11,8 @@ + + + + diff --git a/src/common/ManagedTelemetry/Telemetry/PowerToysTelemetry.cs b/src/common/ManagedTelemetry/Telemetry/PowerToysTelemetry.cs index 9b74c682df..c1b77e67e4 100644 --- a/src/common/ManagedTelemetry/Telemetry/PowerToysTelemetry.cs +++ b/src/common/ManagedTelemetry/Telemetry/PowerToysTelemetry.cs @@ -37,14 +37,17 @@ namespace Microsoft.PowerToys.Telemetry public void WriteEvent(T telemetryEvent) where T : EventBase, IEvent { - this.Write( - telemetryEvent.EventName, - new EventSourceOptions() - { - Keywords = ProjectKeywordMeasure, - Tags = ProjectTelemetryTagProductAndServicePerformance, - }, - telemetryEvent); + if (DataDiagnosticsSettings.GetEnabledValue()) + { + this.Write( + telemetryEvent.EventName, + new EventSourceOptions() + { + Keywords = ProjectKeywordMeasure, + Tags = ProjectTelemetryTagProductAndServicePerformance, + }, + telemetryEvent); + } } } } diff --git a/src/common/SettingsAPI/settings_helpers.cpp b/src/common/SettingsAPI/settings_helpers.cpp index 974b2fff6a..25d9719a66 100644 --- a/src/common/SettingsAPI/settings_helpers.cpp +++ b/src/common/SettingsAPI/settings_helpers.cpp @@ -8,6 +8,8 @@ namespace PTSettingsHelper constexpr inline const wchar_t* last_version_run_filename = L"last_version_run.json"; constexpr inline const wchar_t* opened_at_first_launch_json_field_name = L"openedAtFirstLaunch"; constexpr inline const wchar_t* last_version_json_field_name = L"last_version"; + constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys"; + constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnostics"; std::wstring get_root_save_folder_location() { @@ -25,7 +27,7 @@ namespace PTSettingsHelper return result; } - std::wstring get_local_low_folder_location() + std::wstring get_local_low_folder_location() { PWSTR local_app_path; winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppDataLow, 0, NULL, &local_app_path)); @@ -112,7 +114,7 @@ namespace PTSettingsHelper bool opened = saved_settings->GetNamedBoolean(opened_at_first_launch_json_field_name, false); return opened; } - + return false; } @@ -124,12 +126,11 @@ namespace PTSettingsHelper json::JsonObject obj; obj.SetNamedValue(opened_at_first_launch_json_field_name, json::value(true)); - json::to_file(oobePath.c_str(), obj); + json::to_file(oobePath.c_str(), obj); } std::wstring get_last_version_run() { - std::filesystem::path lastVersionRunPath(PTSettingsHelper::get_root_save_folder_location()); lastVersionRunPath = lastVersionRunPath.append(last_version_run_filename); if (std::filesystem::exists(lastVersionRunPath)) @@ -157,4 +158,29 @@ namespace PTSettingsHelper json::to_file(lastVersionRunPath.c_str(), obj); } + void save_data_diagnostics(bool enabled) + { + HKEY key{}; + if (RegCreateKeyExW(HKEY_CURRENT_USER, + DataDiagnosticsRegKey, + 0, + nullptr, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + nullptr, + &key, + nullptr) != ERROR_SUCCESS) + { + return; + } + + const bool value = enabled; + const size_t buf_size = sizeof(bool); + if (RegSetValueExW(key, DataDiagnosticsRegValueName, 0, REG_QWORD, reinterpret_cast(&value), buf_size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return; + } + RegCloseKey(key); + } } diff --git a/src/common/SettingsAPI/settings_helpers.h b/src/common/SettingsAPI/settings_helpers.h index 9e01b3b206..14eae8ac62 100644 --- a/src/common/SettingsAPI/settings_helpers.h +++ b/src/common/SettingsAPI/settings_helpers.h @@ -24,4 +24,6 @@ namespace PTSettingsHelper void save_oobe_opened_state(); std::wstring get_last_version_run(); void save_last_version_run(const std::wstring& version); + + void save_data_diagnostics(bool enabled); } diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.cpp b/src/common/Telemetry/EtwTrace/EtwTrace.cpp new file mode 100644 index 0000000000..05b6956953 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/EtwTrace.cpp @@ -0,0 +1,310 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// + +#pragma once +#include "pch.h" + +#include "ETWTrace.h" + +#include + +#include +#include + +namespace fs = std::filesystem; + +namespace +{ + constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys"; + constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnostics"; + constexpr inline const wchar_t* ViewDataDiagnosticsRegValueName = L"DataDiagnosticsViewEnabled"; + + inline std::wstring get_root_save_folder_location() + { + PWSTR local_app_path; + winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &local_app_path)); + std::wstring result{ local_app_path }; + CoTaskMemFree(local_app_path); + + result += L"\\Microsoft\\PowerToys"; + std::filesystem::path save_path(result); + if (!std::filesystem::exists(save_path)) + { + std::filesystem::create_directories(save_path); + } + return result; + } + + bool IsDataDiagnosticsEnabled() + { + 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, + DataDiagnosticsRegValueName, + RRF_RT_REG_DWORD, + nullptr, + &isDataDiagnosticsEnabled, + &size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return false; + } + RegCloseKey(key); + + return isDataDiagnosticsEnabled; + } + + 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 == 1; + } + +} + +namespace Shared +{ + namespace Trace + { + ETWTrace::ETWTrace() + { + GUID id; + if (SUCCEEDED(CLSIDFromString(PowerToysProviderGUID, &id))) + { + m_providerGUID = id; + } + + fs::path outputFolder = get_root_save_folder_location(); + m_etwFolder = (outputFolder / c_etwFolderName); + } + + ETWTrace::ETWTrace(const std::wstring& etlFileNameOverride) : + ETWTrace() + { + m_etlFileNameOverride = etlFileNameOverride; + } + + ETWTrace::~ETWTrace() + { + Flush(); + Stop(); + m_etwFolder.clear(); + m_providerGUID = {}; + } + + void ETWTrace::UpdateState(bool tracing) + { + if (tracing) + { + Start(); + } + else + { + Stop(); + } + } + + void ETWTrace::Flush() + { + if (m_tracing) + { + Control(EVENT_TRACE_CONTROL_FLUSH); + // Control(EVENT_TRACE_CONTROL_INCREMENT_FILE); + } + } + + void ETWTrace::CreateEtwFolderIfNeeded() + { + if (!std::filesystem::exists(m_etwFolder)) + { + std::filesystem::create_directories(m_etwFolder); + } + else if (!std::filesystem::is_directory(m_etwFolder)) + { + std::filesystem::remove(m_etwFolder); + std::filesystem::create_directory(m_etwFolder); + } + + THROW_HR_IF(E_UNEXPECTED, !std::filesystem::exists(m_etwFolder)); + } + + void ETWTrace::InitEventTraceProperties() + { + const std::filesystem::path exePath(wil::GetModuleFileNameW(nullptr)); + const auto exeName = exePath.stem().wstring(); + + auto now = std::chrono::system_clock::now(); + auto timeNow = std::chrono::system_clock::to_time_t(now); + std::wstringstream dateTime; + struct tm timeInfo + { + }; + errno_t err = localtime_s(&timeInfo, &timeNow); + if (err == 0) + { + dateTime << std::put_time(&timeInfo, L"-%m-%d-%Y__%H_%M_%S"); + } + + if (m_etlFileNameOverride.empty()) + { + m_sessionName = wil::str_printf(L"%ws-%d%ws", exeName.c_str(), GetCurrentProcessId(), dateTime.str().c_str()); + } + else + { + m_sessionName = wil::str_printf(L"%ws-%d%ws", m_etlFileNameOverride.c_str(), GetCurrentProcessId(), dateTime.str().c_str()); + } + + std::replace(m_sessionName.begin(), m_sessionName.end(), '.', '_'); + + const ULONG etwSessionNameCharCount = static_cast(m_sessionName.size() + 1); + const ULONG etwSessionNameByteSize = etwSessionNameCharCount * sizeof(m_sessionName[0]); + + auto etlFileNameFormattedCounter = m_sessionName + c_etwNewFileFormattedCounter; + std::filesystem::path etlFilePath = m_etwFolder / etlFileNameFormattedCounter; + etlFilePath.replace_extension(c_etwFileNameEnd); + THROW_HR_IF(E_UNEXPECTED, etlFilePath.empty()); + + const auto etlFilePathStr = etlFilePath.wstring(); + // std::string/wstring returns number of characters not including the null terminator, so add +1 for that. + const ULONG etwFilePathCharCount = static_cast(etlFilePathStr.size() + 1); + const ULONG etwFilePathByteSize = etwFilePathCharCount * sizeof(etlFilePathStr[0]); + + const ULONG bufferSizeInBytes = sizeof(EVENT_TRACE_PROPERTIES) + etwSessionNameByteSize + etwFilePathByteSize; + auto eventTracePropertiesBuffer = std::make_unique(bufferSizeInBytes); + ZeroMemory(eventTracePropertiesBuffer.get(), bufferSizeInBytes); + auto eventTraceProperties = reinterpret_cast(eventTracePropertiesBuffer.get()); + + eventTraceProperties->Wnode.BufferSize = bufferSizeInBytes; + eventTraceProperties->Wnode.Flags = WNODE_FLAG_TRACED_GUID; + eventTraceProperties->Wnode.ClientContext = 1; + eventTraceProperties->Wnode.Guid = m_providerGUID; + eventTraceProperties->BufferSize = 4; // 4KB, the minimum size + eventTraceProperties->LogFileMode = EVENT_TRACE_PRIVATE_LOGGER_MODE | EVENT_TRACE_PRIVATE_IN_PROC | EVENT_TRACE_FILE_MODE_NEWFILE; + eventTraceProperties->MaximumFileSize = 1; // 1 MB + + // LoggerName is placed at the end of EVENT_TRACE_PROPERTIES structure + eventTraceProperties->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES); + wcsncpy_s(reinterpret_cast(eventTracePropertiesBuffer.get() + eventTraceProperties->LoggerNameOffset), etwSessionNameCharCount, m_sessionName.c_str(), etwSessionNameCharCount); + + // LogFileName is placed at the end of the Logger Name + eventTraceProperties->LogFileNameOffset = eventTraceProperties->LoggerNameOffset + etwSessionNameByteSize; + wcsncpy_s(reinterpret_cast(eventTracePropertiesBuffer.get() + eventTraceProperties->LogFileNameOffset), etwFilePathCharCount, etlFilePathStr.c_str(), etwFilePathCharCount); + + m_eventTracePropertiesBuffer = std::move(eventTracePropertiesBuffer); + } + + void ETWTrace::Start() + { + if (m_tracing) + { + return; + } + + if (!IsDataDiagnosticsEnabled()) + { + return; + } + + if (!isViewDataDiagnosticEnabled()) + { + return; + } + + CreateEtwFolderIfNeeded(); + InitEventTraceProperties(); + + auto eventTraceProperties = reinterpret_cast(m_eventTracePropertiesBuffer.get()); + THROW_IF_WIN32_ERROR(StartTrace(&m_traceHandle, m_sessionName.c_str(), eventTraceProperties)); + Enable(EVENT_CONTROL_CODE_ENABLE_PROVIDER); + + m_tracing = true; + + m_flushing_thread = std::thread([this] { FlushWorker(); }); + } + + void ETWTrace::Stop() + { + if (!m_tracing) + { + return; + } + + Enable(EVENT_CONTROL_CODE_DISABLE_PROVIDER); + + // ControlTrace with EVENT_TRACE_CONTROL_STOP on the trace handle, + // which is equivalent to calling CloseTrace() on the trace handle. + Control(EVENT_TRACE_CONTROL_STOP); + + m_traceHandle = INVALID_PROCESSTRACE_HANDLE; + m_eventTracePropertiesBuffer.reset(); + m_tracing = false; + m_terminate_flushing_thread.notify_one(); + m_flushing_thread.join(); + } + + void ETWTrace::Control(ULONG traceControlCode) + { + auto eventTraceProperties = reinterpret_cast(m_eventTracePropertiesBuffer.get()); + const ULONG result = ControlTrace(m_traceHandle, m_sessionName.c_str(), eventTraceProperties, traceControlCode); + THROW_IF_FAILED(HRESULT_FROM_WIN32(result)); + } + + void ETWTrace::Enable(ULONG eventControlCode) + { + // Control the main provider + THROW_IF_WIN32_ERROR(EnableTraceEx2(m_traceHandle, &m_providerGUID, eventControlCode, TRACE_LEVEL_VERBOSE, 0, 0, 0, nullptr)); + } + + void ETWTrace::FlushWorker() + { + std::unique_lock lock(m_mutex); + while (m_tracing) + { + m_terminate_flushing_thread.wait_for(lock, + std::chrono::seconds(30), + [this]() { return !m_tracing.load(); }); + Flush(); + } + } + } +} \ No newline at end of file diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.h b/src/common/Telemetry/EtwTrace/EtwTrace.h new file mode 100644 index 0000000000..46b3e37c40 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/EtwTrace.h @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// + +#pragma once +#include "pch.h" + +#include +#include +#include +#include + +namespace Shared +{ + namespace Trace + { + class ETWTrace + { + public: + static inline const wchar_t* PowerToysProviderGUID = L"{38e8889b-9731-53f5-e901-e8a7c1753074}"; + + ETWTrace(); + ETWTrace(const std::wstring& etlFileNameOverride); + ~ETWTrace(); + + void UpdateState(bool tracing); + void Flush(); + + private: + void CreateEtwFolderIfNeeded(); + void InitEventTraceProperties(); + void Start(); + void Stop(); + void Control(const ULONG traceControlCode); + void Enable(const ULONG eventControlCode); + void FlushWorker(); + + GUID m_providerGUID{}; + std::filesystem::path m_etwFolder; + std::wstring m_sessionName; + TRACEHANDLE m_traceHandle{ INVALID_PROCESSTRACE_HANDLE }; + std::unique_ptr m_eventTracePropertiesBuffer; + std::atomic_bool m_tracing{ false }; + std::wstring m_etlFileNameOverride{}; + std::thread m_flushing_thread; + std::condition_variable m_terminate_flushing_thread; + std::mutex m_mutex; + + static constexpr PCWSTR c_etwFolderName = L"etw"; + static constexpr PCWSTR c_etwNewFileFormattedCounter = L"-%d"; + static constexpr PCWSTR c_etwFileNameEnd = L".etl"; + }; + } +} \ No newline at end of file diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj new file mode 100644 index 0000000000..17b3be7a26 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj @@ -0,0 +1,51 @@ + + + + + 17.0 + Win32Proj + {8f021b46-362b-485c-bfba-ccf83e820cbd} + EtwTrace + + + + StaticLibrary + v143 + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj.filters b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj.filters new file mode 100644 index 0000000000..9127669e77 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + + + + + + + \ No newline at end of file diff --git a/src/common/Telemetry/EtwTrace/packages.config b/src/common/Telemetry/EtwTrace/packages.config new file mode 100644 index 0000000000..ff4b059648 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/common/Telemetry/EtwTrace/pch.cpp b/src/common/Telemetry/EtwTrace/pch.cpp new file mode 100644 index 0000000000..64b7eef6d6 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/src/common/Telemetry/EtwTrace/pch.h b/src/common/Telemetry/EtwTrace/pch.h new file mode 100644 index 0000000000..8db0e0c1e8 --- /dev/null +++ b/src/common/Telemetry/EtwTrace/pch.h @@ -0,0 +1,23 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#endif //PCH_H diff --git a/src/common/Telemetry/TraceBase.h b/src/common/Telemetry/TraceBase.h new file mode 100644 index 0000000000..da722bb457 --- /dev/null +++ b/src/common/Telemetry/TraceBase.h @@ -0,0 +1,63 @@ +#pragma once + +#include "ProjectTelemetry.h" + +#define TraceLoggingWriteWrapper(provider, eventName, ...) \ + if (IsDataDiagnosticsEnabled()) \ + { \ + TraceLoggingWrite(provider, eventName, __VA_ARGS__); \ + } + +namespace telemetry +{ + +constexpr inline const wchar_t* DataDiagnosticsRegKey = L"Software\\Classes\\PowerToys"; +constexpr inline const wchar_t* DataDiagnosticsRegValueName = L"AllowDataDiagnostics"; + +class TraceBase +{ +public: + static void RegisterProvider() + { + TraceLoggingRegister(g_hProvider); + } + + static void UnregisterProvider() + { + TraceLoggingUnregister(g_hProvider); + } + + static bool IsDataDiagnosticsEnabled() + { + 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, + DataDiagnosticsRegValueName, + RRF_RT_REG_DWORD, + nullptr, + &isDataDiagnosticsEnabled, + &size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return false; + } + RegCloseKey(key); + + return isDataDiagnosticsEnabled; + } +}; + +} // namespace telemetry \ No newline at end of file diff --git a/src/common/interop/Constants.cpp b/src/common/interop/Constants.cpp index 7a01cd225a..0a7f8c0291 100644 --- a/src/common/interop/Constants.cpp +++ b/src/common/interop/Constants.cpp @@ -51,6 +51,10 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT; } + hstring Constants::TerminateColorPickerSharedEvent() + { + return CommonSharedConstants::TERMINATE_COLOR_PICKER_SHARED_EVENT; + } hstring Constants::AdvancedPasteShowUIMessage() { return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_MESSAGE; @@ -71,10 +75,18 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE; } + hstring Constants::AdvancedPasteTerminateAppMessage() + { + return CommonSharedConstants::ADVANCED_PASTE_TERMINATE_APP_MESSAGE; + } hstring Constants::ShowPowerOCRSharedEvent() { return CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT; } + hstring Constants::TerminatePowerOCRSharedEvent() + { + return CommonSharedConstants::TERMINATE_POWEROCR_SHARED_EVENT; + } hstring Constants::MouseJumpShowPreviewEvent() { return CommonSharedConstants::MOUSE_JUMP_SHOW_PREVIEW_EVENT; @@ -87,6 +99,10 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::SHOW_PEEK_SHARED_EVENT; } + hstring Constants::TerminatePeekEvent() + { + return CommonSharedConstants::TERMINATE_PEEK_SHARED_EVENT; + } hstring Constants::PowerAccentExitEvent() { return CommonSharedConstants::POWERACCENT_EXIT_EVENT; @@ -135,6 +151,10 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::SHOW_HOSTS_ADMIN_EVENT; } + hstring Constants::TerminateHostsSharedEvent() + { + return CommonSharedConstants::TERMINATE_HOSTS_EVENT; + } hstring Constants::CropAndLockThumbnailEvent() { return CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT; @@ -159,4 +179,8 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::WORKSPACES_HOTKEY_EVENT; } + hstring Constants::PowerToysRunnerTerminateSettingsEvent() + { + return CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT; + } } diff --git a/src/common/interop/Constants.h b/src/common/interop/Constants.h index 09a884e50b..351349959b 100644 --- a/src/common/interop/Constants.h +++ b/src/common/interop/Constants.h @@ -16,15 +16,19 @@ namespace winrt::PowerToys::Interop::implementation static hstring FZEToggleEvent(); static hstring ColorPickerSendSettingsTelemetryEvent(); static hstring ShowColorPickerSharedEvent(); + static hstring TerminateColorPickerSharedEvent(); static hstring AdvancedPasteShowUIMessage(); static hstring AdvancedPasteMarkdownMessage(); static hstring AdvancedPasteJsonMessage(); static hstring AdvancedPasteAdditionalActionMessage(); static hstring AdvancedPasteCustomActionMessage(); + static hstring AdvancedPasteTerminateAppMessage(); static hstring ShowPowerOCRSharedEvent(); + static hstring TerminatePowerOCRSharedEvent(); static hstring MouseJumpShowPreviewEvent(); static hstring AwakeExitEvent(); static hstring ShowPeekEvent(); + static hstring TerminatePeekEvent(); static hstring PowerAccentExitEvent(); static hstring ShortcutGuideTriggerEvent(); static hstring RegistryPreviewTriggerEvent(); @@ -37,12 +41,14 @@ namespace winrt::PowerToys::Interop::implementation static hstring SvgPreviewResizeEvent(); static hstring ShowHostsSharedEvent(); static hstring ShowHostsAdminSharedEvent(); + static hstring TerminateHostsSharedEvent(); static hstring CropAndLockThumbnailEvent(); static hstring CropAndLockReparentEvent(); static hstring ShowEnvironmentVariablesSharedEvent(); static hstring ShowEnvironmentVariablesAdminSharedEvent(); static hstring WorkspacesLaunchEditorEvent(); static hstring WorkspacesHotkeyEvent(); + static hstring PowerToysRunnerTerminateSettingsEvent(); }; } diff --git a/src/common/interop/Constants.idl b/src/common/interop/Constants.idl index 9ae489c62b..736f7dd49b 100644 --- a/src/common/interop/Constants.idl +++ b/src/common/interop/Constants.idl @@ -13,15 +13,19 @@ namespace PowerToys static String FZEToggleEvent(); static String ColorPickerSendSettingsTelemetryEvent(); static String ShowColorPickerSharedEvent(); + static String TerminateColorPickerSharedEvent(); static String AdvancedPasteShowUIMessage(); static String AdvancedPasteMarkdownMessage(); static String AdvancedPasteJsonMessage(); static String AdvancedPasteAdditionalActionMessage(); static String AdvancedPasteCustomActionMessage(); + static String AdvancedPasteTerminateAppMessage(); static String ShowPowerOCRSharedEvent(); + static String TerminatePowerOCRSharedEvent(); static String MouseJumpShowPreviewEvent(); static String AwakeExitEvent(); static String ShowPeekEvent(); + static String TerminatePeekEvent(); static String PowerAccentExitEvent(); static String ShortcutGuideTriggerEvent(); static String RegistryPreviewTriggerEvent(); @@ -34,12 +38,14 @@ namespace PowerToys static String SvgPreviewResizeEvent(); static String ShowHostsSharedEvent(); static String ShowHostsAdminSharedEvent(); + static String TerminateHostsSharedEvent(); static String CropAndLockThumbnailEvent(); static String CropAndLockReparentEvent(); static String ShowEnvironmentVariablesSharedEvent(); static String ShowEnvironmentVariablesAdminSharedEvent(); static String WorkspacesLaunchEditorEvent(); static String WorkspacesHotkeyEvent(); + static String PowerToysRunnerTerminateSettingsEvent(); } } } \ No newline at end of file diff --git a/src/common/interop/shared_constants.h b/src/common/interop/shared_constants.h index c98b143104..364bc6cf7f 100644 --- a/src/common/interop/shared_constants.h +++ b/src/common/interop/shared_constants.h @@ -12,6 +12,9 @@ namespace CommonSharedConstants const wchar_t APPDATA_PATH[] = L"Microsoft\\PowerToys"; + // Path to the event used by runner to terminate Settings app + const wchar_t TERMINATE_SETTINGS_SHARED_EVENT[] = L"Local\\PowerToysRunnerTerminateSettingsEvent-c34cb661-2e69-4613-a1f8-4e39c25d7ef6"; + // Path to the event used by PowerLauncher const wchar_t POWER_LAUNCHER_SHARED_EVENT[] = L"Local\\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab"; @@ -36,9 +39,13 @@ namespace CommonSharedConstants const wchar_t ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE[] = L"CustomAction"; + const wchar_t ADVANCED_PASTE_TERMINATE_APP_MESSAGE[] = L"TerminateApp"; + // Path to the event used to show Color Picker const wchar_t SHOW_COLOR_PICKER_SHARED_EVENT[] = L"Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525"; + const wchar_t TERMINATE_COLOR_PICKER_SHARED_EVENT[] = L"Local\\TerminateColorPickerEvent-3d676258-c4d5-424e-a87a-4be22020e813"; + const wchar_t SHORTCUT_GUIDE_TRIGGER_EVENT[] = L"Local\\ShortcutGuide-TriggerEvent-d4275ad3-2531-4d19-9252-c0becbd9b496"; const wchar_t SHORTCUT_GUIDE_EXIT_EVENT[] = L"Local\\ShortcutGuide-ExitEvent-35697cdd-a3d2-47d6-a246-34efcc73eac0"; @@ -53,18 +60,24 @@ namespace CommonSharedConstants const wchar_t SHOW_HOSTS_ADMIN_EVENT[] = L"Local\\Hosts-ShowHostsAdminEvent-60ff44e2-efd3-43bf-928a-f4d269f98bec"; + const wchar_t TERMINATE_HOSTS_EVENT[] = L"Local\\Hosts-TerminateHostsEvent-d5410d5e-45a6-4d11-bbf0-a4ec2d064888"; + // Path to the event used by Awake const wchar_t AWAKE_EXIT_EVENT[] = L"Local\\PowerToysAwakeExitEvent-c0d5e305-35fc-4fb5-83ec-f6070cfaf7fe"; // Path to the event used by AlwaysOnTop const wchar_t ALWAYS_ON_TOP_PIN_EVENT[] = L"Local\\AlwaysOnTopPinEvent-892e0aa2-cfa8-4cc4-b196-ddeb32314ce8"; + const wchar_t ALWAYS_ON_TOP_TERMINATE_EVENT[] = L"Local\\AlwaysOnTopTerminateEvent-cfdf1eae-791f-4953-8021-2f18f3837eae"; + // Path to the event used by PowerAccent const wchar_t POWERACCENT_EXIT_EVENT[] = L"Local\\PowerToysPowerAccentExitEvent-53e93389-d19a-4fbb-9b36-1981c8965e17"; // Path to the event used by PowerOCR const wchar_t SHOW_POWEROCR_SHARED_EVENT[] = L"Local\\PowerOCREvent-dc864e06-e1af-4ecc-9078-f98bee745e3a"; + const wchar_t TERMINATE_POWEROCR_SHARED_EVENT[] = L"Local\\TerminatePowerOCREvent-08e5de9d-15df-4ea8-8840-487c13435a67"; + // Path to the events used by Mouse Jump const wchar_t MOUSE_JUMP_SHOW_PREVIEW_EVENT[] = L"Local\\MouseJumpEvent-aa0be051-3396-4976-b7ba-1a9cc7d236a5"; @@ -94,6 +107,11 @@ namespace CommonSharedConstants // Path to the event used to show Peek const wchar_t SHOW_PEEK_SHARED_EVENT[] = L"Local\\ShowPeekEvent"; + // Path to the event used to terminate Peek + const wchar_t TERMINATE_PEEK_SHARED_EVENT[] = L"Local\\TerminatePeekEvent-267149fe-7ed2-427d-a3ad-9e18203c037c"; + + // Path to the event used to terminate KBM + const wchar_t TERMINATE_KBM_SHARED_EVENT[] = L"Local\\TerminateKBMSharedEvent-a787c967-55b6-47de-94d9-56f39fed839e"; // Path to the events used by CropAndLock const wchar_t CROP_AND_LOCK_REPARENT_EVENT[] = L"Local\\PowerToysCropAndLockReparentEvent-6060860a-76a1-44e8-8d0e-6355785e9c36"; diff --git a/src/common/utils/EventWaiter.h b/src/common/utils/EventWaiter.h index 304f475ade..1a2ba89f02 100644 --- a/src/common/utils/EventWaiter.h +++ b/src/common/utils/EventWaiter.h @@ -1,3 +1,5 @@ +#pragma once + #include #include #include diff --git a/src/common/utils/gpo.h b/src/common/utils/gpo.h index 0f721d93d5..04e03b4767 100644 --- a/src/common/utils/gpo.h +++ b/src/common/utils/gpo.h @@ -72,6 +72,7 @@ namespace powertoys_gpo { // The registry value names for other PowerToys policies. const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation"; + const std::wstring POLICY_ALLOW_DATA_DIAGNOSTICS = L"AllowDataDiagnostics"; const std::wstring POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS = L"PowerLauncherAllPluginsEnabledState"; const std::wstring POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS = L"AllowPowerToysAdvancedPasteOnlineAIModels"; const std::wstring POLICY_MWB_CLIPBOARD_SHARING_ENABLED = L"MwbClipboardSharingEnabled"; @@ -487,6 +488,11 @@ namespace powertoys_gpo { return getConfiguredValue(POLICY_ALLOW_EXPERIMENTATION); } + inline gpo_rule_configured_t getAllowDataDiagnosticsValue() + { + return getConfiguredValue(POLICY_ALLOW_DATA_DIAGNOSTICS); + } + inline gpo_rule_configured_t getRunPluginEnabledValue(std::string pluginID) { if (pluginID == "" || pluginID == " ") diff --git a/src/gpo/assets/PowerToys.admx b/src/gpo/assets/PowerToys.admx index 0459a6f601..799b1f20f3 100644 --- a/src/gpo/assets/PowerToys.admx +++ b/src/gpo/assets/PowerToys.admx @@ -5,7 +5,7 @@ - + @@ -22,6 +22,7 @@ + @@ -509,6 +510,16 @@ + + + + + + + + + + diff --git a/src/gpo/assets/en-US/PowerToys.adml b/src/gpo/assets/en-US/PowerToys.adml index 588ccf3d1d..7a8f037eee 100644 --- a/src/gpo/assets/en-US/PowerToys.adml +++ b/src/gpo/assets/en-US/PowerToys.adml @@ -1,7 +1,7 @@ - + PowerToys PowerToys @@ -28,6 +28,7 @@ PowerToys version 0.83.0 or later PowerToys version 0.84.0 or later PowerToys version 0.85.0 or later + PowerToys version 0.86.0 or later This policy configures the enabled state for all PowerToys utilities. @@ -101,6 +102,12 @@ If disabled or not configured, the user can control this in the settings of Powe If this setting is enabled or not configured, the user can control experimentation in the PowerToys settings menu. If this setting is disabled, experimentation is not allowed. + + This policy configures whether sending of PowerToys diagnostic data is allowed. With diagnostic data sending allowed the user helps inform bug fixes, performance and improvements. + +If this setting is enabled or not configured, the user can control diagnostic data sending in the PowerToys settings menu. + +If this setting is disabled, diagnostic data sending is not allowed. This policy configures the enabled state for all PowerToys Run plugins. All plugins will have the same state. @@ -258,6 +265,7 @@ If you don't configure this policy, the user takes control over the setting and Disable user defined IP Address mapping rules Predefined IP Address mapping rules Hide template filename extension + Allow sending diagnostic data diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs index 77f8551803..3595276c5d 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs @@ -18,6 +18,7 @@ using AdvancedPaste.ViewModels; using ManagedCommon; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; using Windows.Graphics; @@ -38,6 +39,8 @@ namespace AdvancedPaste { public IHost Host { get; private set; } + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); + private static readonly Dictionary AdditionalActionIPCKeys = typeof(PasteFormats).GetFields() .Where(field => field.IsLiteral) @@ -111,7 +114,11 @@ namespace AdvancedPaste { RunnerHelper.WaitForPowerToysRunner(powerToysRunnerPid, () => { - Environment.Exit(0); + _dispatcherQueue.TryEnqueue(() => + { + Dispose(); + Environment.Exit(0); + }); }); } } @@ -154,6 +161,11 @@ namespace AdvancedPaste { await OnAdvancedPasteCustomActionHotkey(messageParts); } + else if (messageType == PowerToys.Interop.Constants.AdvancedPasteTerminateAppMessage()) + { + Dispose(); + Environment.Exit(0); + } } private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) @@ -244,6 +256,7 @@ namespace AdvancedPaste { if (disposing) { + EtwTrace?.Dispose(); window.Dispose(); } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs index 8f675e4d4e..6536bcfed9 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/MainWindow.xaml.cs @@ -12,6 +12,7 @@ using AdvancedPaste.Settings; using AdvancedPaste.ViewModels; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; using WinUIEx; @@ -96,6 +97,7 @@ namespace AdvancedPaste if (!_disposedValue) { _msgMonitor?.Dispose(); + (Application.Current as App).EtwTrace?.Dispose(); _disposedValue = true; } diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp index 4da030d6ba..8bd2e0860e 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp @@ -384,7 +384,6 @@ private: m_hProcess = sei.hProcess; } - std::optional get_pipe_name(const std::wstring& prefix) const { UUID temp_uuid; @@ -761,6 +760,8 @@ public: // Destroy the powertoy and free memory virtual void destroy() override { + Disable(false); + Logger::trace("AdvancedPaste::destroy()"); delete this; } @@ -851,15 +852,21 @@ public: launch_process_and_named_pipe(); }; - virtual void disable() + void Disable(bool traceEvent) { - Logger::trace("AdvancedPaste::disable()"); if (m_enabled) { + send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_TERMINATE_APP_MESSAGE); + WaitForSingleObject(m_hProcess, 1500); + m_write_pipe = nullptr; TerminateProcess(m_hProcess, 1); - Trace::AdvancedPaste_Enable(false); + + if (traceEvent) + { + Trace::AdvancedPaste_Enable(false); + } CloseHandle(m_hProcess); m_hProcess = 0; @@ -868,6 +875,12 @@ public: m_enabled = false; } + virtual void disable() + { + Logger::trace("AdvancedPaste::disable()"); + Disable(true); + } + virtual bool on_hotkey(size_t hotkeyId) override { Logger::trace(L"AdvancedPaste hotkey pressed"); diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/pch.h b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/pch.h index 809b965271..e730ab2036 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/pch.h +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/pch.h @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include \ No newline at end of file diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp index 0ae92a7187..aa6162c465 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.cpp @@ -8,20 +8,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has AdvancedPaste enabled or disabled void Trace::AdvancedPaste_Enable(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "AdvancedPaste_EnableAdvancedPaste", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +22,7 @@ void Trace::AdvancedPaste_Enable(const bool enabled) noexcept // Log if the user has invoked AdvancedPaste void Trace::AdvancedPaste_Invoked(std::wstring mode) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "AdvancedPaste_InvokeAdvancedPaste", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -43,7 +33,7 @@ void Trace::AdvancedPaste_Invoked(std::wstring mode) noexcept // Log if an error occurs in AdvancedPaste void Trace::AdvancedPaste_Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "AdvancedPaste_Error", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -83,7 +73,7 @@ void Trace::AdvancedPaste_SettingsTelemetry(const PowertoyModuleIface::Hotkey& p return it != additionalActionsHotkeys.end() ? getHotkeyCStr(it->second) : L""; }; - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "AdvancedPaste_Settings", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h index 7c0504d58e..c7cee38877 100644 --- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h +++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h @@ -1,13 +1,11 @@ #pragma once +#include #include #include -class Trace +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has AdvancedPaste enabled or disabled static void AdvancedPaste_Enable(const bool enabled) noexcept; diff --git a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj index 0f6c2bb1d1..89177bd56f 100644 --- a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj +++ b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj @@ -151,6 +151,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + diff --git a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj.filters b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj.filters index 98752f066d..bea68db119 100644 --- a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj.filters +++ b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj.filters @@ -27,6 +27,7 @@ + diff --git a/src/modules/CropAndLock/CropAndLock/main.cpp b/src/modules/CropAndLock/CropAndLock/main.cpp index dc530b7769..79d26fc8c1 100644 --- a/src/modules/CropAndLock/CropAndLock/main.cpp +++ b/src/modules/CropAndLock/CropAndLock/main.cpp @@ -4,16 +4,20 @@ #include "CropAndLockWindow.h" #include "ThumbnailCropAndLockWindow.h" #include "ReparentCropAndLockWindow.h" -#include -#include -#include -#include -#include #include "ModuleConstants.h" -#include #include "trace.h" -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#include + +#include +#include +#include +#include +#include + +#include + +#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") namespace winrt { @@ -36,6 +40,11 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I // Initialize COM winrt::init_apartment(winrt::apartment_type::single_threaded); + Trace::CropAndLock::RegisterProvider(); + + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + // Initialize logger automatic logging of exceptions. LoggerHelpers::init_logger(NonLocalizable::ModuleKey, L"", LogSettings::cropAndLockLoggerName); InitUnhandledExceptionHandler(); @@ -107,8 +116,7 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I HANDLE m_exit_event_handle; std::thread m_event_triggers_thread; - std::function removeWindowCallback = [&](HWND windowHandle) - { + std::function removeWindowCallback = [&](HWND windowHandle) { if (!m_running) { // If we're not running, the reference to croppedWindows might no longer be valid and cause a crash at exit time, due to being called by destructors after wWinMain returns. @@ -122,8 +130,7 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I } }; - std::function ProcessCommand = [&](CropAndLockType mode) - { + std::function ProcessCommand = [&](CropAndLockType mode) { std::function windowCroppedCallback = [&, mode](HWND targetWindow, RECT cropRect) { auto targetInfo = util::WindowInfo(targetWindow); // TODO: Fix WindowInfo.h to not contain the null char at the end. @@ -196,7 +203,7 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I m_event_triggers_thread = std::thread([&]() { MSG msg; - HANDLE event_handles[3] = {m_reparent_event_handle, m_thumbnail_event_handle, m_exit_event_handle}; + HANDLE event_handles[3] = { m_reparent_event_handle, m_thumbnail_event_handle, m_exit_event_handle }; while (m_running) { DWORD dwEvt = MsgWaitForMultipleObjects(3, event_handles, false, INFINITE, QS_ALLINPUT); @@ -258,6 +265,10 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I DispatchMessageW(&msg); } + trace.Flush(); + + Trace::CropAndLock::UnregisterProvider(); + m_running = false; // Needed to unblock MsgWaitForMultipleObjects one last time SetEvent(m_reparent_event_handle); diff --git a/src/modules/CropAndLock/CropAndLock/pch.h b/src/modules/CropAndLock/CropAndLock/pch.h index 720033cbca..75bb5f4a61 100644 --- a/src/modules/CropAndLock/CropAndLock/pch.h +++ b/src/modules/CropAndLock/CropAndLock/pch.h @@ -74,7 +74,6 @@ #include "WindowRectUtil.h" // PowerToys -#include #include // Application resources diff --git a/src/modules/CropAndLock/CropAndLock/trace.cpp b/src/modules/CropAndLock/CropAndLock/trace.cpp index fb5dd802c5..42674ec624 100644 --- a/src/modules/CropAndLock/CropAndLock/trace.cpp +++ b/src/modules/CropAndLock/CropAndLock/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + // Telemetry strings should not be localized. #define LoggingProviderKey "Microsoft.PowerToys" @@ -11,19 +13,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::CropAndLock::Enable(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_EnableCropAndLock", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -33,7 +25,7 @@ void Trace::CropAndLock::Enable(bool enabled) noexcept void Trace::CropAndLock::ActivateReparent() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_ActivateReparent", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -42,7 +34,7 @@ void Trace::CropAndLock::ActivateReparent() noexcept void Trace::CropAndLock::ActivateThumbnail() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_ActivateThumbnail", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -51,7 +43,7 @@ void Trace::CropAndLock::ActivateThumbnail() noexcept void Trace::CropAndLock::CreateReparentWindow() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_CreateReparentWindow", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -60,7 +52,7 @@ void Trace::CropAndLock::CreateReparentWindow() noexcept void Trace::CropAndLock::CreateThumbnailWindow() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_CreateThumbnailWindow", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -84,12 +76,11 @@ void Trace::CropAndLock::SettingsTelemetry(PowertoyModuleIface::Hotkey& reparent std::wstring(thumbnailHotkey.alt ? L"Alt + " : L"") + std::wstring(L"VK ") + std::to_wstring(thumbnailHotkey.key); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CropAndLock_Settings", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE), TraceLoggingWideString(hotKeyStrReparent.c_str(), "ReparentHotKey"), - TraceLoggingWideString(hotKeyStrThumbnail.c_str(), "ThumbnailHotkey") - ); + TraceLoggingWideString(hotKeyStrThumbnail.c_str(), "ThumbnailHotkey")); } diff --git a/src/modules/CropAndLock/CropAndLock/trace.h b/src/modules/CropAndLock/CropAndLock/trace.h index f7e1903ee6..5a9aaa95ca 100644 --- a/src/modules/CropAndLock/CropAndLock/trace.h +++ b/src/modules/CropAndLock/CropAndLock/trace.h @@ -1,13 +1,12 @@ #pragma once + +#include #include class Trace { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - - class CropAndLock + class CropAndLock : public telemetry::TraceBase { public: static void Enable(bool enabled) noexcept; diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp b/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp index c313d63cd7..42c7c6da7e 100644 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp +++ b/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp @@ -40,13 +40,13 @@ BOOL APIENTRY DllMain( HMODULE /*hModule*/, switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: - Trace::RegisterProvider(); + Trace::CropAndLock::RegisterProvider(); break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: - Trace::UnregisterProvider(); + Trace::CropAndLock::UnregisterProvider(); break; } return TRUE; diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h b/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h index 0df2e08a6f..3914e22561 100644 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h +++ b/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h @@ -6,7 +6,5 @@ #include #include #include -#include -#include #include #include diff --git a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/App.xaml.cs b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/App.xaml.cs index bc6f5aa1da..e40478f222 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/App.xaml.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/App.xaml.cs @@ -26,6 +26,8 @@ namespace EnvironmentVariables { public IHost Host { get; } + public ETWTrace EtwTrace { get; } = new ETWTrace(); + public static T GetService() where T : class { diff --git a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml index 78d46d85c7..32c536101e 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml +++ b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml @@ -1,4 +1,4 @@ - + diff --git a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml.cs b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml.cs index 7a67a1dfbf..891fadfe1d 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml.cs @@ -88,5 +88,10 @@ namespace EnvironmentVariables return NativeMethods.CallWindowProc(oldWndProc, hWnd, msg, wParam, lParam); } + + private void Window_Closed(object sender, WindowEventArgs args) + { + (App.Current as EnvironmentVariables.App).EtwTrace?.Dispose(); + } } } diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/pch.h b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/pch.h index 6f70098567..308dff2b3a 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/pch.h +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/pch.h @@ -10,7 +10,6 @@ #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files #include -#include #include #include diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.cpp b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.cpp index bb458c1b6d..6cb84aed08 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.cpp +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has Environment Variables enabled or disabled void Trace::EnableEnvironmentVariables(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "EnvironmentVariables_EnableEnvironmentVariables", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableEnvironmentVariables(const bool enabled) noexcept // Log that the user tried to activate the editor void Trace::ActivateEnvironmentVariables() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "EnvironmentVariables_Activate", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.h b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.h index 0898da4602..fa37b043b5 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.h +++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has EnvironmentVariables enabled or disabled static void EnableEnvironmentVariables(const bool enabled) noexcept; diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj index ac0580c2a0..10478cd30c 100644 --- a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj +++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj @@ -128,6 +128,9 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {cc6e41ac-8174-4e8a-8d22-85dd7f4851df} diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters index 5ec8585829..6646b4fc10 100644 --- a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters +++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters @@ -1,5 +1,6 @@  - + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp b/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp index 1abf0e947b..a597b9ca80 100644 --- a/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp +++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp @@ -1,6 +1,7 @@ // dllmain.cpp : Defines the entry point for the DLL application. #include "pch.h" +#include #include #include #include @@ -20,6 +21,7 @@ using namespace Microsoft::WRL; HINSTANCE g_hInst = 0; +Shared::Trace::ETWTrace trace(L"FileLocksmithContextMenu"); BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, @@ -91,6 +93,8 @@ public: IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept { + trace.UpdateState(true); + Trace::Invoked(); ipc::Writer writer; @@ -102,6 +106,9 @@ public: if (HRESULT result = writer.start(); FAILED(result)) { Trace::InvokedRet(result); + + trace.Flush(); + trace.UpdateState(false); return result; } @@ -114,6 +121,10 @@ public: { result = E_FAIL; Trace::InvokedRet(result); + + trace.Flush(); + trace.UpdateState(false); + return result; } @@ -140,6 +151,10 @@ public: } Trace::InvokedRet(S_OK); + + trace.Flush(); + trace.UpdateState(false); + return S_OK; } diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp index bc4ab945ca..49e2e67c19 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp +++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp @@ -152,8 +152,13 @@ IFACEMETHODIMP ExplorerCommand::QueryContextMenu(HMENU hmenu, UINT indexMenu, UI if (!InsertMenuItem(hmenu, indexMenu, TRUE, &mii)) { + m_etwTrace.UpdateState(true); + hr = HRESULT_FROM_WIN32(GetLastError()); Trace::QueryContextMenuError(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); } else { @@ -166,6 +171,8 @@ IFACEMETHODIMP ExplorerCommand::QueryContextMenu(HMENU hmenu, UINT indexMenu, UI IFACEMETHODIMP ExplorerCommand::InvokeCommand(CMINVOKECOMMANDINFO* pici) { + m_etwTrace.UpdateState(true); + HRESULT hr = E_FAIL; if (FileLocksmithSettingsInstance().GetEnabled() && @@ -178,12 +185,16 @@ IFACEMETHODIMP ExplorerCommand::InvokeCommand(CMINVOKECOMMANDINFO* pici) if (HRESULT result = writer.start(); FAILED(result)) { Trace::InvokedRet(result); + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); return result; } if (HRESULT result = LaunchUI(pici, &writer); FAILED(result)) { Trace::InvokedRet(result); + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); return result; } @@ -217,6 +228,9 @@ IFACEMETHODIMP ExplorerCommand::InvokeCommand(CMINVOKECOMMANDINFO* pici) } Trace::InvokedRet(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); return hr; } diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h index d59f266157..143b6afd9f 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h +++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h @@ -4,6 +4,8 @@ #include "FileLocksmithLib/IPC.h" +#include + #define EXPLORER_COMMAND_UUID_STR "84d68575-e186-46ad-b0cb-baeb45ee29c0" class __declspec(uuid(EXPLORER_COMMAND_UUID_STR)) ExplorerCommand : public IExplorerCommand, public IShellExtInit, public IContextMenu @@ -50,4 +52,6 @@ private: std::atomic m_ref_count = 1; IDataObject* m_data_obj = NULL; std::wstring context_menu_caption; + + Shared::Trace::ETWTrace m_etwTrace{ L"FileExplorerExt" }; }; diff --git a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj index 9bfad7f8a8..0c285a8bfa 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj +++ b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj @@ -103,6 +103,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp b/src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp index 98b2f9985d..a3d8e9038e 100644 --- a/src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp +++ b/src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp @@ -1,7 +1,8 @@ #include "pch.h" #include "Trace.h" -#include "../common/Telemetry/ProjectTelemetry.h" + +#include TRACELOGGING_DEFINE_PROVIDER( g_hProvider, @@ -10,19 +11,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnableFileLocksmith(_In_ bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FileLocksmith_EnableFileLocksmith", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +23,7 @@ void Trace::EnableFileLocksmith(_In_ bool enabled) noexcept void Trace::Invoked() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FileLocksmith_Invoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -41,7 +32,7 @@ void Trace::Invoked() noexcept void Trace::InvokedRet(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FileLocksmith_InvokedRet", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -51,7 +42,7 @@ void Trace::InvokedRet(_In_ HRESULT hr) noexcept void Trace::QueryContextMenuError(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FileLocksmith_QueryContextMenuError", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/FileLocksmith/FileLocksmithLib/Trace.h b/src/modules/FileLocksmith/FileLocksmithLib/Trace.h index a9516b5d5c..98642de854 100644 --- a/src/modules/FileLocksmith/FileLocksmithLib/Trace.h +++ b/src/modules/FileLocksmith/FileLocksmithLib/Trace.h @@ -2,11 +2,11 @@ #include "pch.h" -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void EnableFileLocksmith(_In_ bool enabled) noexcept; static void Invoked() noexcept; static void InvokedRet(_In_ HRESULT hr) noexcept; diff --git a/src/modules/Hosts/Hosts/Helpers/NativeEventWaiter.cs b/src/modules/Hosts/Hosts/Helpers/NativeEventWaiter.cs new file mode 100644 index 0000000000..b63468d553 --- /dev/null +++ b/src/modules/Hosts/Hosts/Helpers/NativeEventWaiter.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Threading; + +using Microsoft.UI.Dispatching; + +namespace Hosts.Helpers +{ + public static class NativeEventWaiter + { + public static void WaitForEventLoop(string eventName, Action callback) + { + var dispatcherQueue = DispatcherQueue.GetForCurrentThread(); + new Thread(() => + { + var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, eventName); + while (true) + { + if (eventHandle.WaitOne()) + { + dispatcherQueue.TryEnqueue(() => callback()); + } + } + }).Start(); + } + } +} diff --git a/src/modules/Hosts/Hosts/HostsXAML/App.xaml.cs b/src/modules/Hosts/Hosts/HostsXAML/App.xaml.cs index cd4d8b177f..7c4d6c389e 100644 --- a/src/modules/Hosts/Hosts/HostsXAML/App.xaml.cs +++ b/src/modules/Hosts/Hosts/HostsXAML/App.xaml.cs @@ -17,7 +17,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Dispatching; using Microsoft.UI.Xaml; - +using PowerToys.Interop; using static HostsUILib.Settings.IUserSettings; using Host = Hosts.Helpers.Host; @@ -93,6 +93,12 @@ namespace Hosts cleanupBackupThread.Start(); UnhandledException += App_UnhandledException; + + Hosts.Helpers.NativeEventWaiter.WaitForEventLoop(Constants.TerminateHostsSharedEvent(), () => + { + EtwTrace?.Dispose(); + Environment.Exit(0); + }); } /// @@ -112,6 +118,7 @@ namespace Hosts RunnerHelper.WaitForPowerToysRunner(powerToysRunnerPid, () => { Logger.LogInfo("PowerToys Runner exited. Exiting Hosts"); + EtwTrace?.Dispose(); dispatcher.TryEnqueue(App.Current.Exit); }); } @@ -133,5 +140,7 @@ namespace Hosts } private Window window; + + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); } } diff --git a/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml b/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml index c1229b2ec3..73a883f68b 100644 --- a/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml +++ b/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml @@ -1,4 +1,4 @@ - diff --git a/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml.cs b/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml.cs index 3f8c01de83..d1632c21ee 100644 --- a/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml.cs +++ b/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml.cs @@ -62,5 +62,10 @@ namespace Hosts MainGrid.Children.Add(MainPage); Grid.SetRow(MainPage, 1); } + + private void WindowEx_Closed(object sender, WindowEventArgs args) + { + (Application.Current as App).EtwTrace?.Dispose(); + } } } diff --git a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp index 85077c8dbe..807c0829c3 100644 --- a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp +++ b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp @@ -55,6 +55,8 @@ private: HANDLE m_hShowAdminEvent{}; + HANDLE m_hTerminateEvent{}; + bool is_process_running() { return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT; @@ -142,6 +144,17 @@ public: } } + m_hTerminateEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_HOSTS_EVENT); + if (!m_hTerminateEvent) + { + Logger::error(L"Failed to create terminate hosts event"); + auto message = get_last_error_message(GetLastError()); + if (message.has_value()) + { + Logger::error(message.value()); + } + } + m_showEventWaiter = EventWaiter(CommonSharedConstants::SHOW_HOSTS_EVENT, [&](int err) { if (m_enabled && err == ERROR_SUCCESS) @@ -264,6 +277,8 @@ public: ResetEvent(m_hShowAdminEvent); } + SetEvent(m_hTerminateEvent); + WaitForSingleObject(m_hProcess, 1500); TerminateProcess(m_hProcess, 1); } diff --git a/src/modules/Hosts/HostsModuleInterface/pch.h b/src/modules/Hosts/HostsModuleInterface/pch.h index 7c6ad2a235..5cb4cbf823 100644 --- a/src/modules/Hosts/HostsModuleInterface/pch.h +++ b/src/modules/Hosts/HostsModuleInterface/pch.h @@ -2,4 +2,3 @@ #define WIN32_LEAN_AND_MEAN #include -#include \ No newline at end of file diff --git a/src/modules/Hosts/HostsModuleInterface/trace.cpp b/src/modules/Hosts/HostsModuleInterface/trace.cpp index 391917a8f2..104075a829 100644 --- a/src/modules/Hosts/HostsModuleInterface/trace.cpp +++ b/src/modules/Hosts/HostsModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has HostsFileEditor enabled or disabled void Trace::EnableHostsFileEditor(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "HostsFileEditor_EnableHostsFileEditor", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableHostsFileEditor(const bool enabled) noexcept // Log that the user tried to activate the editor void Trace::ActivateEditor() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "HostsFileEditor_Activate", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/Hosts/HostsModuleInterface/trace.h b/src/modules/Hosts/HostsModuleInterface/trace.h index 92132b7f54..f3dc6310b5 100644 --- a/src/modules/Hosts/HostsModuleInterface/trace.h +++ b/src/modules/Hosts/HostsModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has HostsFileEditor enabled or disabled static void EnableHostsFileEditor(const bool enabled) noexcept; diff --git a/src/modules/Hosts/HostsUILib/HostsMainPage.xaml.cs b/src/modules/Hosts/HostsUILib/HostsMainPage.xaml.cs index 8f3303c5ca..197fab4a3b 100644 --- a/src/modules/Hosts/HostsUILib/HostsMainPage.xaml.cs +++ b/src/modules/Hosts/HostsUILib/HostsMainPage.xaml.cs @@ -32,7 +32,7 @@ namespace HostsUILib.Views public ICommand UpdateAdditionalLinesCommand => new RelayCommand(UpdateAdditionalLines); - public ICommand ExitCommand => new RelayCommand(() => { Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread().TryEnqueue(Application.Current.Exit); }); + public ICommand ExitCommand => new RelayCommand(() => { Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread().TryEnqueue(() => { Environment.Exit(0); }); }); public HostsMainPage(MainViewModel viewModel) { diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.cpp b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.cpp index d4f90ba678..214d8c0818 100644 --- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.cpp @@ -111,7 +111,11 @@ namespace winrt::PowerToys::MeasureToolCore::implementation #endif _overlayUIStates.push_back(std::move(overlayUI)); } + + trace.UpdateState(true); Trace::BoundsToolActivated(); + trace.Flush(); + trace.UpdateState(false); } void Core::StartMeasureTool(const bool horizontal, const bool vertical) @@ -160,7 +164,10 @@ namespace winrt::PowerToys::MeasureToolCore::implementation _screenCaptureThreads.emplace_back(std::move(thread)); } + trace.UpdateState(true); Trace::MeasureToolActivated(); + trace.Flush(); + trace.UpdateState(false); } void MeasureToolCore::implementation::Core::SetToolCompletionEvent(ToolSessionCompleted sessionCompletedTrigger) diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.h b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.h index 79728794a9..da0b3afb17 100644 --- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.h +++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.h @@ -5,6 +5,7 @@ #include "OverlayUI.h" #include "Settings.h" +#include #include #include "ScreenCapturing.h" @@ -50,6 +51,7 @@ namespace winrt::PowerToys::MeasureToolCore::implementation BoundsToolState _boundsToolState; CommonState _commonState; Settings _settings; + Shared::Trace::ETWTrace trace{}; }; } diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj index b05546d9aa..5bdad6767c 100644 --- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj +++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj @@ -125,6 +125,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/MeasureTool/MeasureToolCore/pch.h b/src/modules/MeasureTool/MeasureToolCore/pch.h index 67ca0f9d8c..16cc5a1a62 100644 --- a/src/modules/MeasureTool/MeasureToolCore/pch.h +++ b/src/modules/MeasureTool/MeasureToolCore/pch.h @@ -30,7 +30,6 @@ #include #include #include -#include // Undefine GetCurrentTime macro to prevent // conflict with Storyboard::GetCurrentTime diff --git a/src/modules/MeasureTool/MeasureToolModuleInterface/pch.h b/src/modules/MeasureTool/MeasureToolModuleInterface/pch.h index 207418a921..9e02b6c9ce 100644 --- a/src/modules/MeasureTool/MeasureToolModuleInterface/pch.h +++ b/src/modules/MeasureTool/MeasureToolModuleInterface/pch.h @@ -9,6 +9,5 @@ #include #include -#include #include #include diff --git a/src/modules/MeasureTool/MeasureToolModuleInterface/trace.cpp b/src/modules/MeasureTool/MeasureToolModuleInterface/trace.cpp index 8c1bb93605..1a56838048 100644 --- a/src/modules/MeasureTool/MeasureToolModuleInterface/trace.cpp +++ b/src/modules/MeasureTool/MeasureToolModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnableMeasureTool(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MeasureTool_EnableMeasureTool", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -30,7 +22,7 @@ void Trace::EnableMeasureTool(const bool enabled) noexcept void Trace::BoundsToolActivated() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MeasureTool_BoundsToolActivated", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -39,7 +31,7 @@ void Trace::BoundsToolActivated() noexcept void Trace::MeasureToolActivated() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MeasureTool_MeasureToolActivated", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MeasureTool/MeasureToolModuleInterface/trace.h b/src/modules/MeasureTool/MeasureToolModuleInterface/trace.h index e85a14bb38..fb2019c8d5 100644 --- a/src/modules/MeasureTool/MeasureToolModuleInterface/trace.h +++ b/src/modules/MeasureTool/MeasureToolModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - static void EnableMeasureTool(const bool enabled) noexcept; static void BoundsToolActivated() noexcept; diff --git a/src/modules/MouseUtils/FindMyMouse/pch.h b/src/modules/MouseUtils/FindMyMouse/pch.h index 6dbc256004..26da2455f2 100644 --- a/src/modules/MouseUtils/FindMyMouse/pch.h +++ b/src/modules/MouseUtils/FindMyMouse/pch.h @@ -15,6 +15,5 @@ #endif #include -#include #include #include diff --git a/src/modules/MouseUtils/FindMyMouse/trace.cpp b/src/modules/MouseUtils/FindMyMouse/trace.cpp index a5cfe02417..bf79461e9a 100644 --- a/src/modules/MouseUtils/FindMyMouse/trace.cpp +++ b/src/modules/MouseUtils/FindMyMouse/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has FindMyMouse enabled or disabled void Trace::EnableFindMyMouse(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FindMyMouse_EnableFindMyMouse", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableFindMyMouse(const bool enabled) noexcept // Log that the user activated the module by focusing the mouse pointer void Trace::MousePointerFocused() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FindMyMouse_MousePointerFocused", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MouseUtils/FindMyMouse/trace.h b/src/modules/MouseUtils/FindMyMouse/trace.h index 623ce60176..59d3183b5b 100644 --- a/src/modules/MouseUtils/FindMyMouse/trace.h +++ b/src/modules/MouseUtils/FindMyMouse/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has FindMyMouse enabled or disabled static void EnableFindMyMouse(const bool enabled) noexcept; diff --git a/src/modules/MouseUtils/MouseHighlighter/pch.h b/src/modules/MouseUtils/MouseHighlighter/pch.h index bfb4a4776a..da08f4898a 100644 --- a/src/modules/MouseUtils/MouseHighlighter/pch.h +++ b/src/modules/MouseUtils/MouseHighlighter/pch.h @@ -16,7 +16,6 @@ #include #endif -#include #include #include #include diff --git a/src/modules/MouseUtils/MouseHighlighter/trace.cpp b/src/modules/MouseUtils/MouseHighlighter/trace.cpp index feefa17745..7f8d413b5a 100644 --- a/src/modules/MouseUtils/MouseHighlighter/trace.cpp +++ b/src/modules/MouseUtils/MouseHighlighter/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has MouseHighlighter enabled or disabled void Trace::EnableMouseHighlighter(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseHighlighter_EnableMouseHighlighter", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableMouseHighlighter(const bool enabled) noexcept // Log that the user activated the module by starting a highlighting session void Trace::StartHighlightingSession() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseHighlighter_StartHighlightingSession", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MouseUtils/MouseHighlighter/trace.h b/src/modules/MouseUtils/MouseHighlighter/trace.h index 01d660bbc0..12708940e9 100644 --- a/src/modules/MouseUtils/MouseHighlighter/trace.h +++ b/src/modules/MouseUtils/MouseHighlighter/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has MouseHighlighter enabled or disabled static void EnableMouseHighlighter(const bool enabled) noexcept; diff --git a/src/modules/MouseUtils/MouseJump/pch.h b/src/modules/MouseUtils/MouseJump/pch.h index 74abb62da1..575f5e9355 100644 --- a/src/modules/MouseUtils/MouseJump/pch.h +++ b/src/modules/MouseUtils/MouseJump/pch.h @@ -5,6 +5,5 @@ #include //#include -#include #include #include diff --git a/src/modules/MouseUtils/MouseJump/trace.cpp b/src/modules/MouseUtils/MouseJump/trace.cpp index 9f5380284d..dd2399eb68 100644 --- a/src/modules/MouseUtils/MouseJump/trace.cpp +++ b/src/modules/MouseUtils/MouseJump/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnableJumpTool(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseJump_EnableJumpTool", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -30,7 +22,7 @@ void Trace::EnableJumpTool(const bool enabled) noexcept void Trace::InvokeJumpTool() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseJump_InvokeJumpTool", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MouseUtils/MouseJump/trace.h b/src/modules/MouseUtils/MouseJump/trace.h index aaaa336291..c70e2c746c 100644 --- a/src/modules/MouseUtils/MouseJump/trace.h +++ b/src/modules/MouseUtils/MouseJump/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - static void EnableJumpTool(const bool enabled) noexcept; static void InvokeJumpTool() noexcept; diff --git a/src/modules/MouseUtils/MousePointerCrosshairs/pch.h b/src/modules/MouseUtils/MousePointerCrosshairs/pch.h index 5fc459cbc9..1240987498 100644 --- a/src/modules/MouseUtils/MousePointerCrosshairs/pch.h +++ b/src/modules/MouseUtils/MousePointerCrosshairs/pch.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/src/modules/MouseUtils/MousePointerCrosshairs/trace.cpp b/src/modules/MouseUtils/MousePointerCrosshairs/trace.cpp index afc9844bc5..00924f030d 100644 --- a/src/modules/MouseUtils/MousePointerCrosshairs/trace.cpp +++ b/src/modules/MouseUtils/MousePointerCrosshairs/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has MousePointerCrosshairs enabled or disabled void Trace::EnableMousePointerCrosshairs(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MousePointerCrosshairs_EnableMousePointerCrosshairs", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableMousePointerCrosshairs(const bool enabled) noexcept // Log that the user activated the module by having the crosshairs be drawn void Trace::StartDrawingCrosshairs() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MousePointerCrosshairs_StartDrawingCrosshairs", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MouseUtils/MousePointerCrosshairs/trace.h b/src/modules/MouseUtils/MousePointerCrosshairs/trace.h index d7373e5347..b60fc33336 100644 --- a/src/modules/MouseUtils/MousePointerCrosshairs/trace.h +++ b/src/modules/MouseUtils/MousePointerCrosshairs/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has MousePointerCrosshairs enabled or disabled static void EnableMousePointerCrosshairs(const bool enabled) noexcept; diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs b/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs index 8a562e3b70..7c0dd4eb9b 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Common.ShutdownWithPowerToys.cs @@ -3,9 +3,10 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; +using MouseWithoutBorders.Class; using Logger = MouseWithoutBorders.Core.Logger; @@ -13,12 +14,13 @@ namespace MouseWithoutBorders { internal class ShutdownWithPowerToys { - public static void WaitForPowerToysRunner() + public static void WaitForPowerToysRunner(ETWTrace etwTrace) { try { RunnerHelper.WaitForPowerToysRunnerExitFallback(() => { + etwTrace?.Dispose(); Common.MainForm.Quit(true, false); }); } diff --git a/src/modules/MouseWithoutBorders/App/Class/Program.cs b/src/modules/MouseWithoutBorders/App/Class/Program.cs index 91ed60874f..ac33da9ae9 100644 --- a/src/modules/MouseWithoutBorders/App/Class/Program.cs +++ b/src/modules/MouseWithoutBorders/App/Class/Program.cs @@ -57,6 +57,8 @@ namespace MouseWithoutBorders.Class ManagedCommon.Logger.InitializeLogger("\\MouseWithoutBorders\\Logs"); Logger.Log(Application.ProductName + " Started!"); + ETWTrace etwTrace = new ETWTrace(); + if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredMouseWithoutBordersEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled) { Logger.Log("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); @@ -117,7 +119,7 @@ namespace MouseWithoutBorders.Class } } - ShutdownWithPowerToys.WaitForPowerToysRunner(); + ShutdownWithPowerToys.WaitForPowerToysRunner(etwTrace); if (firstArg != string.Empty) { @@ -225,6 +227,8 @@ namespace MouseWithoutBorders.Class var formScreen = new FrmScreen(); Application.Run(formScreen); + + etwTrace?.Dispose(); } catch (Exception e) { diff --git a/src/modules/MouseWithoutBorders/App/Helper/Program.cs b/src/modules/MouseWithoutBorders/App/Helper/Program.cs index 7a3ae0424b..874a0ac2a4 100644 --- a/src/modules/MouseWithoutBorders/App/Helper/Program.cs +++ b/src/modules/MouseWithoutBorders/App/Helper/Program.cs @@ -8,6 +8,7 @@ using System.IO; using System.Windows.Forms; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; namespace MouseWithoutBorders { @@ -38,8 +39,11 @@ namespace MouseWithoutBorders return; } + ETWTrace etwTrace = new ETWTrace(); + RunnerHelper.WaitForPowerToysRunnerExitFallback(() => { + etwTrace?.Dispose(); Application.Exit(); }); @@ -76,6 +80,8 @@ namespace MouseWithoutBorders dotForm = new FormDot(); Application.Run(FormHelper = new FormHelper()); + + etwTrace?.Dispose(); } } } diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp b/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp index d2203e6ff5..463d527230 100644 --- a/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp +++ b/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp @@ -22,13 +22,13 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRese { case DLL_PROCESS_ATTACH: g_hInst_MouseWithoutBorders = hModule; - Trace::RegisterProvider(); + Trace::MouseWithoutBorders::RegisterProvider(); break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: - Trace::UnregisterProvider(); + Trace::MouseWithoutBorders::UnregisterProvider(); break; } return TRUE; diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/pch.h b/src/modules/MouseWithoutBorders/ModuleInterface/pch.h index cb0737a69d..0270a7bc39 100644 --- a/src/modules/MouseWithoutBorders/ModuleInterface/pch.h +++ b/src/modules/MouseWithoutBorders/ModuleInterface/pch.h @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/trace.cpp b/src/modules/MouseWithoutBorders/ModuleInterface/trace.cpp index fb2f631bc6..7986ceefa4 100644 --- a/src/modules/MouseWithoutBorders/ModuleInterface/trace.cpp +++ b/src/modules/MouseWithoutBorders/ModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + // Telemetry strings should not be localized. #define LoggingProviderKey "Microsoft.PowerToys" @@ -14,19 +16,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::MouseWithoutBorders::Enable(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventEnableMouseWithoutBordersKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -36,7 +28,7 @@ void Trace::MouseWithoutBorders::Enable(bool enabled) noexcept void Trace::MouseWithoutBorders::ToggleServiceRegistration(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseWithoutBorders_ToggleServiceRegistration", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -46,7 +38,7 @@ void Trace::MouseWithoutBorders::ToggleServiceRegistration(bool enabled) noexcep void Trace::MouseWithoutBorders::Activate() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseWithoutBorders_Activate", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -56,7 +48,7 @@ void Trace::MouseWithoutBorders::Activate() noexcept // Log that the user tried to activate the editor void Trace::MouseWithoutBorders::AddFirewallRule() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "MouseWithoutBorders_AddFirewallRule", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/trace.h b/src/modules/MouseWithoutBorders/ModuleInterface/trace.h index 1f9099eaae..ecd27cbd2d 100644 --- a/src/modules/MouseWithoutBorders/ModuleInterface/trace.h +++ b/src/modules/MouseWithoutBorders/ModuleInterface/trace.h @@ -1,12 +1,11 @@ #pragma once +#include + class Trace { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - - class MouseWithoutBorders + class MouseWithoutBorders : public telemetry::TraceBase { public: static void Enable(bool enabled) noexcept; diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/NewShellExtensionContextMenu.vcxproj b/src/modules/NewPlus/NewShellExtensionContextMenu/NewShellExtensionContextMenu.vcxproj index 9444e849c0..8d2e617579 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/NewShellExtensionContextMenu.vcxproj +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/NewShellExtensionContextMenu.vcxproj @@ -167,6 +167,9 @@ MakeAppx.exe pack /d . /p $(OutDir)NewPlusPackage.msix /nv {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.cpp index 5ad3537bb2..878673826b 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.cpp @@ -4,7 +4,10 @@ #include "dll_main.h" #include "trace.h" +#include + HMODULE module_instance_handle = 0; +Shared::Trace::ETWTrace trace(L"NewPlusShellExtension"); BOOL APIENTRY DllMain(HMODULE module_handle, DWORD ul_reason_for_call, LPVOID reserved) { diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.h b/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.h index f6c4284a10..9e980caa0d 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.h +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/dll_main.h @@ -1,3 +1,6 @@ #pragma once -extern HMODULE module_instance_handle; \ No newline at end of file +#include + +extern HMODULE module_instance_handle; +extern Shared::Trace::ETWTrace trace; \ No newline at end of file diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu.cpp index 148dffd952..47f93beac7 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu.cpp @@ -7,6 +7,7 @@ using namespace Microsoft::WRL; // // Sub context menu command enumerator shell_context_sub_menu::shell_context_sub_menu(const ComPtr site_of_folder) { + trace.UpdateState(true); this->site_of_folder = site_of_folder; // Determine the New+ Template folder location diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp index 99378f468a..12e5f9cf5c 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/shell_context_sub_menu_item.cpp @@ -63,8 +63,11 @@ IFACEMETHODIMP shell_context_sub_menu_item::GetState(_In_opt_ IShellItemArray* s IFACEMETHODIMP shell_context_sub_menu_item::Invoke(_In_opt_ IShellItemArray*, _In_opt_ IBindCtx*) noexcept { + HRESULT hr = S_OK; try { + trace.UpdateState(true); + // Determine target path of where context menu was displayed const auto target_path_name = utilities::get_path_from_unknown_site(site_of_folder); @@ -90,16 +93,19 @@ IFACEMETHODIMP shell_context_sub_menu_item::Invoke(_In_opt_ IShellItemArray*, _I this->template_entry->enter_rename_mode(site_of_folder, target_final_fullpath); Trace::EventCopyTemplateResult(S_OK); - - return S_OK; } catch (const std::exception& ex) { Trace::EventCopyTemplateResult(S_FALSE); Logger::error(ex.what()); + + hr = S_FALSE; } - return S_FALSE; + trace.Flush(); + trace.UpdateState(false); + + return hr; } IFACEMETHODIMP shell_context_sub_menu_item::GetFlags(_Out_ EXPCMDFLAGS* returned_flags) diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/trace.cpp b/src/modules/NewPlus/NewShellExtensionContextMenu/trace.cpp index 0def375024..3a2c8c8c91 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/trace.cpp +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/trace.cpp @@ -10,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EventToggleOnOff(_In_ const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "NewPlus_EventToggleOnOff", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +22,7 @@ void Trace::EventToggleOnOff(_In_ const bool enabled) noexcept void Trace::EventChangedTemplateLocation() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "NewPlus_ChangedTemplateLocation", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -41,7 +31,7 @@ void Trace::EventChangedTemplateLocation() noexcept void Trace::EventShowTemplateItems(const size_t number_of_templates) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "NewPlus_EventShowTemplateItems", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -51,7 +41,7 @@ void Trace::EventShowTemplateItems(const size_t number_of_templates) noexcept void Trace::EventCopyTemplate(_In_ const std::wstring template_file_extension) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "NewPlus_EventCopyTemplate", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -61,7 +51,7 @@ void Trace::EventCopyTemplate(_In_ const std::wstring template_file_extension) n void Trace::EventCopyTemplateResult(_In_ const HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "NewPlus_EventCopyTemplateResult", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/NewPlus/NewShellExtensionContextMenu/trace.h b/src/modules/NewPlus/NewShellExtensionContextMenu/trace.h index 2d87e88588..7c21086642 100644 --- a/src/modules/NewPlus/NewShellExtensionContextMenu/trace.h +++ b/src/modules/NewPlus/NewShellExtensionContextMenu/trace.h @@ -2,11 +2,11 @@ #include "pch.h" -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void EventToggleOnOff(_In_ const bool new_enabled_state) noexcept; static void EventChangedTemplateLocation() noexcept; static void EventShowTemplateItems(_In_ const size_t number_of_templates) noexcept; diff --git a/src/modules/PowerOCR/PowerOCR/App.xaml.cs b/src/modules/PowerOCR/PowerOCR/App.xaml.cs index eab9acd8cd..77987ab5cd 100644 --- a/src/modules/PowerOCR/PowerOCR/App.xaml.cs +++ b/src/modules/PowerOCR/PowerOCR/App.xaml.cs @@ -6,10 +6,12 @@ using System; using System.Globalization; using System.Threading; using System.Windows; - +using Common.UI; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; using PowerOCR.Keyboard; using PowerOCR.Settings; +using PowerToys.Interop; namespace PowerOCR; @@ -22,6 +24,7 @@ public partial class App : Application, IDisposable private EventMonitor? eventMonitor; private Mutex? _instanceMutex; private int _powerToysRunnerPid; + private ETWTrace etwTrace = new ETWTrace(); private CancellationTokenSource NativeThreadCTS { get; set; } @@ -43,12 +46,19 @@ public partial class App : Application, IDisposable } NativeThreadCTS = new CancellationTokenSource(); + + NativeEventWaiter.WaitForEventLoop( + Constants.TerminatePowerOCRSharedEvent(), + this.Shutdown, + this.Dispatcher, + NativeThreadCTS.Token); } public void Dispose() { GC.SuppressFinalize(this); keyboardMonitor?.Dispose(); + etwTrace?.Dispose(); } private void Application_Startup(object sender, StartupEventArgs e) diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp b/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp index 1eebf010ee..b9695d6d35 100644 --- a/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp +++ b/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp @@ -69,6 +69,8 @@ private: // Handle to event used to invoke PowerOCR HANDLE m_hInvokeEvent; + // Handle to event used to terminate PowerOCR + HANDLE m_hTerminateEvent; void parse_hotkey(PowerToysSettings::PowerToyValues& settings) { @@ -160,6 +162,7 @@ public: app_key = PowerOcrConstants::ModuleKey; LoggerHelpers::init_logger(app_key, L"ModuleInterface", "TextExtractor"); m_hInvokeEvent = CreateDefaultEvent(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT); + m_hTerminateEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_POWEROCR_SHARED_EVENT); init_settings(); } @@ -249,6 +252,8 @@ public: if (m_enabled) { ResetEvent(m_hInvokeEvent); + SetEvent(m_hTerminateEvent); + WaitForSingleObject(m_hProcess, 1500); TerminateProcess(m_hProcess, 1); } diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h b/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h index eddac0fdc1..329705f63b 100644 --- a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h +++ b/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h @@ -2,6 +2,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp index 6751270726..979619b915 100644 --- a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp +++ b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has PowerOCR enabled or disabled void Trace::EnablePowerOCR(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerOCR_EnablePowerOCR", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h index a68576c302..b8e428994e 100644 --- a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h +++ b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h @@ -1,10 +1,10 @@ #pragma once -class Trace + +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has PowerOCR enabled or disabled static void EnablePowerOCR(const bool enabled) noexcept; }; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj index 68ef97516d..045be94f2b 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj +++ b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj @@ -158,6 +158,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/main.cpp b/src/modules/ShortcutGuide/ShortcutGuide/main.cpp index 4cd5d78a72..713446403b 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/main.cpp +++ b/src/modules/ShortcutGuide/ShortcutGuide/main.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include "shortcut_guide.h" #include "target_state.h" #include "ShortcutGuideConstants.h" @@ -48,6 +50,9 @@ int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, _In_opt_ HINSTANCE /*hPrevInst winrt::init_apartment(); LoggerHelpers::init_logger(ShortcutGuideConstants::ModuleKey, L"ShortcutGuide", LogSettings::shortcutGuideLoggerName); + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + if (powertoys_gpo::getConfiguredShortcutGuideEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled) { Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); @@ -132,6 +137,8 @@ int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, _In_opt_ HINSTANCE /*hPrevInst window.ShowWindow(); run_message_loop(); + + trace.Flush(); Trace::UnregisterProvider(); return 0; } diff --git a/src/modules/ShortcutGuide/ShortcutGuide/pch.h b/src/modules/ShortcutGuide/ShortcutGuide/pch.h index 7cfa22c4fa..9ec2bbcb41 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/pch.h +++ b/src/modules/ShortcutGuide/ShortcutGuide/pch.h @@ -25,6 +25,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp b/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp index b68e7bbcad..f2a414d6ac 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp +++ b/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::SendGuideSession(const __int64 duration_ms, const wchar_t* close_type) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ShortcutGuide_GuideSession", TraceLoggingInt64(duration_ms, "DurationInMs"), @@ -32,7 +24,7 @@ void Trace::SendGuideSession(const __int64 duration_ms, const wchar_t* close_typ void Trace::SendSettings(ShortcutGuideSettings settings) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ShortcutGuide_Settings", TraceLoggingWideString(settings.hotkey.c_str(), "Hotkey"), diff --git a/src/modules/ShortcutGuide/ShortcutGuide/trace.h b/src/modules/ShortcutGuide/ShortcutGuide/trace.h index 97f9d75bc8..a3446a8570 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/trace.h +++ b/src/modules/ShortcutGuide/ShortcutGuide/trace.h @@ -1,11 +1,11 @@ #pragma once #include "ShortcutGuideSettings.h" -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void SendGuideSession(const __int64 duration_ms, const wchar_t* close_type) noexcept; static void SendSettings(ShortcutGuideSettings settings) noexcept; }; diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/pch.h b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/pch.h index 799a9214a1..37cb34a58a 100644 --- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/pch.h +++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/pch.h @@ -2,7 +2,6 @@ #define NOMINMAX #include #include -#include #include #include #include \ No newline at end of file diff --git a/src/modules/Workspaces/WorkspacesEditor/App.xaml.cs b/src/modules/Workspaces/WorkspacesEditor/App.xaml.cs index df86a35ed9..669230b744 100644 --- a/src/modules/Workspaces/WorkspacesEditor/App.xaml.cs +++ b/src/modules/Workspaces/WorkspacesEditor/App.xaml.cs @@ -9,6 +9,7 @@ using System.Windows; using Common.UI; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; using WorkspacesEditor.Utils; using WorkspacesEditor.ViewModels; @@ -31,6 +32,8 @@ namespace WorkspacesEditor private bool _isDisposed; + private ETWTrace etwTrace = new ETWTrace(); + public App() { WorkspacesEditorIO = new WorkspacesEditorIO(); @@ -135,6 +138,7 @@ namespace WorkspacesEditor { ThemeManager?.Dispose(); _instanceMutex?.Dispose(); + etwTrace?.Dispose(); } _isDisposed = true; diff --git a/src/modules/Workspaces/WorkspacesEditor/MainWindow.xaml.cs b/src/modules/Workspaces/WorkspacesEditor/MainWindow.xaml.cs index 63bcb15016..a0a7f96a06 100644 --- a/src/modules/Workspaces/WorkspacesEditor/MainWindow.xaml.cs +++ b/src/modules/Workspaces/WorkspacesEditor/MainWindow.xaml.cs @@ -8,6 +8,7 @@ using System.Windows; using System.Windows.Interop; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; using WorkspacesEditor.Utils; using WorkspacesEditor.ViewModels; diff --git a/src/modules/Workspaces/WorkspacesLauncher/WorkspacesLauncher.vcxproj b/src/modules/Workspaces/WorkspacesLauncher/WorkspacesLauncher.vcxproj index 8ff482677c..9d4fc4bcab 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/WorkspacesLauncher.vcxproj +++ b/src/modules/Workspaces/WorkspacesLauncher/WorkspacesLauncher.vcxproj @@ -155,6 +155,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {b31fcc55-b5a4-4ea7-b414-2dceae6af332} diff --git a/src/modules/Workspaces/WorkspacesLauncher/main.cpp b/src/modules/Workspaces/WorkspacesLauncher/main.cpp index 3e7c8c7db1..09f63785b1 100644 --- a/src/modules/Workspaces/WorkspacesLauncher/main.cpp +++ b/src/modules/Workspaces/WorkspacesLauncher/main.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include #include @@ -14,6 +16,7 @@ #include #include +#include const std::wstring moduleName = L"Workspaces\\WorkspacesLauncher"; const std::wstring internalPath = L""; @@ -22,7 +25,12 @@ const std::wstring instanceMutexName = L"Local\\PowerToys_WorkspacesLauncher_Ins int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cmdShow) { LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::workspacesLauncherLoggerName); - InitUnhandledExceptionHandler(); + InitUnhandledExceptionHandler(); + + Trace::Workspaces::RegisterProvider(); + + Shared::Trace::ETWTrace trace{}; + trace.UpdateState(true); if (powertoys_gpo::getConfiguredWorkspacesEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled) { @@ -60,7 +68,7 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm GetModuleFileNameW(nullptr, exe_path.get(), exe_path_size); const auto modulePath = get_module_folderpath(); - + std::string cmdLineStr(cmdline); std::wstring cmdLineWStr(cmdLineStr.begin(), cmdLineStr.end()); @@ -78,7 +86,7 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm } SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); - + Logger::trace(L"Invoke point: {}", cmdArgs.invokePoint); // read workspaces @@ -105,12 +113,12 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm formattedMessage = fmt::format(GET_RESOURCE_STRING(IDS_INCORRECT_FILE_ERROR), file); break; } - + MessageBox(NULL, formattedMessage.c_str(), GET_RESOURCE_STRING(IDS_WORKSPACES).c_str(), MB_ICONERROR | MB_OK); return 1; } } - + if (projectToLaunch.id.empty()) { auto file = WorkspacesData::WorkspacesFile(); @@ -177,7 +185,7 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm } } - // update the file before launching, so WorkspacesWindowArranger and WorkspacesLauncherUI could get updated app paths + // update the file before launching, so WorkspacesWindowArranger and WorkspacesLauncherUI could get updated app paths if (updatedApps || updatedIds) { for (int i = 0; i < workspaces.size(); i++) @@ -193,7 +201,14 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm } // launch - Launcher launcher(projectToLaunch, workspaces, cmdArgs.invokePoint); + { + Launcher launcher(projectToLaunch, workspaces, cmdArgs.invokePoint); + } + + trace.Flush(); + trace.UpdateState(false); + + Trace::Workspaces::UnregisterProvider(); Logger::trace("Finished"); CoUninitialize(); diff --git a/src/modules/Workspaces/WorkspacesLib/trace.cpp b/src/modules/Workspaces/WorkspacesLib/trace.cpp index 2802175058..5b80fb2601 100644 --- a/src/modules/Workspaces/WorkspacesLib/trace.cpp +++ b/src/modules/Workspaces/WorkspacesLib/trace.cpp @@ -13,19 +13,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::Workspaces::Enable(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Workspaces_Enable", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -77,7 +67,7 @@ void Trace::Workspaces::Launch(bool success, errorStr += exeName + L":" + errorMessage + L"; "; } - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Workspaces_LaunchEvent", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/Workspaces/WorkspacesLib/trace.h b/src/modules/Workspaces/WorkspacesLib/trace.h index d5569ba0b0..addb4bf245 100644 --- a/src/modules/Workspaces/WorkspacesLib/trace.h +++ b/src/modules/Workspaces/WorkspacesLib/trace.h @@ -5,13 +5,12 @@ #include #include +#include + class Trace { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - - class Workspaces + class Workspaces : public telemetry::TraceBase { public: static void Enable(bool enabled) noexcept; diff --git a/src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp b/src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp index 21ccd19261..90c898fc5f 100644 --- a/src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp +++ b/src/modules/Workspaces/WorkspacesModuleInterface/dllmain.cpp @@ -38,7 +38,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: - Trace::RegisterProvider(); + Trace::Workspaces::RegisterProvider(); break; case DLL_THREAD_ATTACH: @@ -46,7 +46,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp break; case DLL_PROCESS_DETACH: - Trace::UnregisterProvider(); + Trace::Workspaces::UnregisterProvider(); break; } return TRUE; diff --git a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp index b9ec910c62..491a0bdf42 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp +++ b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp @@ -32,10 +32,11 @@ bool isExcluded(HWND window) return check_excluded_app(window, processPath, AlwaysOnTopSettings::settings().excludedApps); } -AlwaysOnTop::AlwaysOnTop(bool useLLKH) : +AlwaysOnTop::AlwaysOnTop(bool useLLKH, DWORD mainThreadId) : SettingsObserver({SettingId::FrameEnabled, SettingId::Hotkey, SettingId::ExcludeApps}), m_hinstance(reinterpret_cast(&__ImageBase)), - m_useCentralizedLLKH(useLLKH) + m_useCentralizedLLKH(useLLKH), + m_mainThreadId(mainThreadId) { s_instance = this; DPIAware::EnableDPIAwarenessForThisProcess(); @@ -282,6 +283,7 @@ void AlwaysOnTop::RegisterLLKH() } m_hPinEvent = CreateEventW(nullptr, false, false, CommonSharedConstants::ALWAYS_ON_TOP_PIN_EVENT); + m_hTerminateEvent = CreateEventW(nullptr, false, false, CommonSharedConstants::ALWAYS_ON_TOP_TERMINATE_EVENT); if (!m_hPinEvent) { @@ -289,11 +291,20 @@ void AlwaysOnTop::RegisterLLKH() return; } - m_thread = std::thread([this]() { + if (!m_hTerminateEvent) + { + Logger::warn(L"Failed to create terminateEvent. {}", get_last_error_or_default(GetLastError())); + return; + } + + HANDLE handles[2] = { m_hPinEvent, + m_hTerminateEvent }; + + m_thread = std::thread([this, handles]() { MSG msg; while (m_running) { - DWORD dwEvt = MsgWaitForMultipleObjects(1, &m_hPinEvent, false, INFINITE, QS_ALLINPUT); + DWORD dwEvt = MsgWaitForMultipleObjects(2, handles, false, INFINITE, QS_ALLINPUT); if (!m_running) { break; @@ -307,6 +318,9 @@ void AlwaysOnTop::RegisterLLKH() } break; case WAIT_OBJECT_0 + 1: + PostThreadMessage(m_mainThreadId, WM_QUIT, 0, 0); + break; + case WAIT_OBJECT_0 + 2: if (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); diff --git a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.h b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.h index dc41a12d67..da14d508b2 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.h +++ b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.h @@ -13,7 +13,7 @@ class AlwaysOnTop : public SettingsObserver { public: - AlwaysOnTop(bool useLLKH); + AlwaysOnTop(bool useLLKH, DWORD mainThreadId); ~AlwaysOnTop(); protected: @@ -48,6 +48,8 @@ private: HINSTANCE m_hinstance; std::map> m_topmostWindows{}; HANDLE m_hPinEvent; + HANDLE m_hTerminateEvent; + DWORD m_mainThreadId; std::thread m_thread; const bool m_useCentralizedLLKH; bool m_running = true; diff --git a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj index 95e051238e..bf3e5c6851 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj +++ b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj @@ -170,6 +170,9 @@ {1d5be09d-78c0-4fd7-af00-ae7c1af7c525} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + diff --git a/src/modules/alwaysontop/AlwaysOnTop/main.cpp b/src/modules/alwaysontop/AlwaysOnTop/main.cpp index 8b7d901c7d..417525a852 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/main.cpp +++ b/src/modules/alwaysontop/AlwaysOnTop/main.cpp @@ -1,11 +1,12 @@ #include "pch.h" +#include #include #include #include #include -#include +#include #include #include @@ -17,6 +18,9 @@ const std::wstring instanceMutexName = L"Local\\PowerToys_AlwaysOnTop_InstanceMu int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR lpCmdLine, _In_ int nCmdShow) { + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + winrt::init_apartment(); LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::alwaysOnTopLoggerName); @@ -39,10 +43,11 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, return 0; } + auto mainThreadId = GetCurrentThreadId(); + std::wstring pid = std::wstring(lpCmdLine); if (!pid.empty()) { - auto mainThreadId = GetCurrentThreadId(); ProcessWaiter::OnProcessTerminate(pid, [mainThreadId](int err) { if (err != ERROR_SUCCESS) { @@ -58,13 +63,15 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, }); } - Trace::RegisterProvider(); + Trace::AlwaysOnTop::RegisterProvider(); - AlwaysOnTop app(!pid.empty()); + AlwaysOnTop app(!pid.empty(), mainThreadId); run_message_loop(); - Trace::UnregisterProvider(); - + Trace::AlwaysOnTop::UnregisterProvider(); + + trace.Flush(); + return 0; } diff --git a/src/modules/alwaysontop/AlwaysOnTop/pch.h b/src/modules/alwaysontop/AlwaysOnTop/pch.h index 848c90fea2..d3a92e228f 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/pch.h +++ b/src/modules/alwaysontop/AlwaysOnTop/pch.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/src/modules/alwaysontop/AlwaysOnTop/trace.cpp b/src/modules/alwaysontop/AlwaysOnTop/trace.cpp index ae32849bbf..fb3739f4df 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/trace.cpp +++ b/src/modules/alwaysontop/AlwaysOnTop/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + // Telemetry strings should not be localized. #define LoggingProviderKey "Microsoft.PowerToys" @@ -16,19 +18,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::AlwaysOnTop::Enable(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventEnableAlwaysOnTopKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -38,7 +30,7 @@ void Trace::AlwaysOnTop::Enable(bool enabled) noexcept void Trace::AlwaysOnTop::PinWindow() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventPinWindowKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -47,7 +39,7 @@ void Trace::AlwaysOnTop::PinWindow() noexcept void Trace::AlwaysOnTop::UnpinWindow() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventUnpinWindowKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/alwaysontop/AlwaysOnTop/trace.h b/src/modules/alwaysontop/AlwaysOnTop/trace.h index 23c88d3c01..05ac601101 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/trace.h +++ b/src/modules/alwaysontop/AlwaysOnTop/trace.h @@ -1,12 +1,11 @@ #pragma once +#include + class Trace { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - - class AlwaysOnTop + class AlwaysOnTop : public telemetry::TraceBase { public: static void Enable(bool enabled) noexcept; diff --git a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/dllmain.cpp b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/dllmain.cpp index 83158813c6..84cf9ed949 100644 --- a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/dllmain.cpp +++ b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/dllmain.cpp @@ -35,7 +35,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: - Trace::RegisterProvider(); + Trace::AlwaysOnTop::RegisterProvider(); break; case DLL_THREAD_ATTACH: @@ -43,7 +43,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp break; case DLL_PROCESS_DETACH: - Trace::UnregisterProvider(); + Trace::AlwaysOnTop::UnregisterProvider(); break; } return TRUE; @@ -174,6 +174,7 @@ public: app_name = L"AlwaysOnTop"; //TODO: localize app_key = NonLocalizable::ModuleKey; m_hPinEvent = CreateDefaultEvent(CommonSharedConstants::ALWAYS_ON_TOP_PIN_EVENT); + m_hTerminateEvent = CreateDefaultEvent(CommonSharedConstants::ALWAYS_ON_TOP_TERMINATE_EVENT); init_settings(); } @@ -221,6 +222,12 @@ private: Trace::AlwaysOnTop::Enable(false); } + SetEvent(m_hTerminateEvent); + + // Wait for 1.5 seconds for the process to end correctly and stop etw tracer + WaitForSingleObject(m_hProcess, 1500); + + // If process is still running, terminate it if (m_hProcess) { TerminateProcess(m_hProcess, 0); @@ -294,6 +301,7 @@ private: // Handle to event used to pin/unpin windows HANDLE m_hPinEvent; + HANDLE m_hTerminateEvent; }; extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() diff --git a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/pch.h b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/pch.h index d70de4e4d4..9dc1f70972 100644 --- a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/pch.h +++ b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/pch.h @@ -5,7 +5,5 @@ #include #include #include -#include -#include #include #include diff --git a/src/modules/awake/Awake/Program.cs b/src/modules/awake/Awake/Program.cs index 2dd22db874..08995479d4 100644 --- a/src/modules/awake/Awake/Program.cs +++ b/src/modules/awake/Awake/Program.cs @@ -22,6 +22,7 @@ using Awake.Core.Native; using Awake.Properties; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Telemetry; namespace Awake { @@ -30,6 +31,7 @@ namespace Awake private static Mutex? _mutex; private static FileSystemWatcher? _watcher; private static SettingsUtils? _settingsUtils; + private static ETWTrace _etwTrace = new ETWTrace(); private static bool _startedFromPowerToys; @@ -177,6 +179,7 @@ namespace Awake private static void Exit(string message, int exitCode) { + _etwTrace?.Dispose(); Logger.LogInfo(message); Manager.CompleteExit(exitCode); } diff --git a/src/modules/awake/AwakeModuleInterface/pch.h b/src/modules/awake/AwakeModuleInterface/pch.h index eddac0fdc1..329705f63b 100644 --- a/src/modules/awake/AwakeModuleInterface/pch.h +++ b/src/modules/awake/AwakeModuleInterface/pch.h @@ -2,6 +2,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/awake/AwakeModuleInterface/trace.cpp b/src/modules/awake/AwakeModuleInterface/trace.cpp index fe90aa2658..971084e4ab 100644 --- a/src/modules/awake/AwakeModuleInterface/trace.cpp +++ b/src/modules/awake/AwakeModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has Awake enabled or disabled void Trace::EnableAwake(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Awake_EnableAwake", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/awake/AwakeModuleInterface/trace.h b/src/modules/awake/AwakeModuleInterface/trace.h index 40a903b98a..95a9a4e46e 100644 --- a/src/modules/awake/AwakeModuleInterface/trace.h +++ b/src/modules/awake/AwakeModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has Awake enabled or disabled static void EnableAwake(const bool enabled) noexcept; }; diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/pch.h b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/pch.h index 96a774ab2a..8706bb4cf9 100644 --- a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/pch.h +++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/pch.h @@ -11,6 +11,4 @@ // Windows Header Files #include -#include - #endif //PCH_H diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.cpp b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.cpp index 255c46ea99..c136909f32 100644 --- a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.cpp +++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has CmdNotFound enabled or disabled void Trace::EnableCmdNotFoundGpo(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "CmdNotFound_EnableCmdNotFound", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.h b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.h index 4294c510a6..6fb84c5f10 100644 --- a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.h +++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has CmdNotFound enabled or disabled static void EnableCmdNotFoundGpo(const bool enabled) noexcept; }; diff --git a/src/modules/colorPicker/ColorPicker/dllmain.cpp b/src/modules/colorPicker/ColorPicker/dllmain.cpp index ae235a6686..cf7ebec6a0 100644 --- a/src/modules/colorPicker/ColorPicker/dllmain.cpp +++ b/src/modules/colorPicker/ColorPicker/dllmain.cpp @@ -67,6 +67,8 @@ private: // Handle to event used to invoke ColorPicker HANDLE m_hInvokeEvent; + HANDLE m_hAppTerminateEvent; + void parse_hotkey(PowerToysSettings::PowerToyValues& settings) { auto settingsObject = settings.get_raw_json(); @@ -158,6 +160,7 @@ public: LoggerHelpers::init_logger(app_key, L"ModuleInterface", "ColorPicker"); send_telemetry_event = CreateDefaultEvent(CommonSharedConstants::COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT); m_hInvokeEvent = CreateDefaultEvent(CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT); + m_hAppTerminateEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_COLOR_PICKER_SHARED_EVENT); init_settings(); } @@ -249,6 +252,10 @@ public: { ResetEvent(send_telemetry_event); ResetEvent(m_hInvokeEvent); + + SetEvent(m_hAppTerminateEvent); + WaitForSingleObject(m_hProcess, 1500); + TerminateProcess(m_hProcess, 1); } diff --git a/src/modules/colorPicker/ColorPicker/pch.h b/src/modules/colorPicker/ColorPicker/pch.h index eddac0fdc1..329705f63b 100644 --- a/src/modules/colorPicker/ColorPicker/pch.h +++ b/src/modules/colorPicker/ColorPicker/pch.h @@ -2,6 +2,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/colorPicker/ColorPicker/trace.cpp b/src/modules/colorPicker/ColorPicker/trace.cpp index 285cea034e..61ddb9b3e1 100644 --- a/src/modules/colorPicker/ColorPicker/trace.cpp +++ b/src/modules/colorPicker/ColorPicker/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if ColorPicker is enabled or disabled void Trace::EnableColorPicker(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ColorPicker_EnableColorPicker", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/colorPicker/ColorPicker/trace.h b/src/modules/colorPicker/ColorPicker/trace.h index b133664008..594239cf34 100644 --- a/src/modules/colorPicker/ColorPicker/trace.h +++ b/src/modules/colorPicker/ColorPicker/trace.h @@ -1,10 +1,10 @@ #pragma once -class Trace + +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if ColorPicker is enabled or disabled static void EnableColorPicker(const bool enabled) noexcept; diff --git a/src/modules/colorPicker/ColorPickerUI/App.xaml.cs b/src/modules/colorPicker/ColorPickerUI/App.xaml.cs index 98646583be..0621fbc4b9 100644 --- a/src/modules/colorPicker/ColorPickerUI/App.xaml.cs +++ b/src/modules/colorPicker/ColorPickerUI/App.xaml.cs @@ -10,6 +10,7 @@ using System.Windows; using ColorPicker.Mouse; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; namespace ColorPickerUI { @@ -18,6 +19,8 @@ namespace ColorPickerUI /// public partial class App : Application, IDisposable { + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); + private Mutex _instanceMutex; private static string[] _args; private int _powerToysRunnerPid; @@ -96,6 +99,7 @@ namespace ColorPickerUI if (disposing) { _instanceMutex?.Dispose(); + EtwTrace?.Dispose(); } disposedValue = true; diff --git a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs index c135f82362..eb94d86d1e 100644 --- a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs +++ b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Windows; using ColorPicker.Helpers; using Common.UI; diff --git a/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs b/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs index 63772b7963..518f253456 100644 --- a/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs +++ b/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs @@ -57,6 +57,12 @@ namespace ColorPicker.ViewModels _userSettings = userSettings; _keyboardMonitor = keyboardMonitor; + NativeEventWaiter.WaitForEventLoop( + Constants.TerminateColorPickerSharedEvent(), + Application.Current.Shutdown, + Application.Current.Dispatcher, + exitToken); + NativeEventWaiter.WaitForEventLoop( Constants.ShowColorPickerSharedEvent(), _appStateHandler.StartUserSession, diff --git a/src/modules/fancyzones/FancyZones/FancyZones.vcxproj b/src/modules/fancyzones/FancyZones/FancyZones.vcxproj index d61eeb60fd..b54ee19e34 100644 --- a/src/modules/fancyzones/FancyZones/FancyZones.vcxproj +++ b/src/modules/fancyzones/FancyZones/FancyZones.vcxproj @@ -146,6 +146,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {f9c68edf-ac74-4b77-9af1-005d9c9f6a99} diff --git a/src/modules/fancyzones/FancyZones/FancyZonesApp.cpp b/src/modules/fancyzones/FancyZones/FancyZonesApp.cpp index afa0bf610c..97faec65d5 100644 --- a/src/modules/fancyzones/FancyZones/FancyZonesApp.cpp +++ b/src/modules/fancyzones/FancyZones/FancyZonesApp.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -20,6 +21,14 @@ FancyZonesApp::FancyZonesApp(const std::wstring& appName, const std::wstring& ap InitializeWinhookEventIds(); m_app = MakeFancyZones(reinterpret_cast(&__ImageBase), std::bind(&FancyZonesApp::DisableModule, this)); + m_mainThreadId = GetCurrentThreadId(); + m_exitEventWaiter = EventWaiter(CommonSharedConstants::FZE_EXIT_EVENT, [&](int err) { + if (err == ERROR_SUCCESS) + { + DisableModule(); + } + }); + InitHooks(); s_instance = this; @@ -111,7 +120,7 @@ void FancyZonesApp::InitHooks() void FancyZonesApp::DisableModule() noexcept { - PostQuitMessage(0); + PostThreadMessage(m_mainThreadId, WM_QUIT, 0, 0); } void FancyZonesApp::HandleWinHookEvent(WinHookEvent* data) noexcept diff --git a/src/modules/fancyzones/FancyZones/FancyZonesApp.h b/src/modules/fancyzones/FancyZones/FancyZonesApp.h index b66ba5b540..44c6a306a9 100644 --- a/src/modules/fancyzones/FancyZones/FancyZonesApp.h +++ b/src/modules/fancyzones/FancyZones/FancyZonesApp.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -15,11 +16,14 @@ public: private: static inline FancyZonesApp* s_instance = nullptr; static inline HHOOK s_llKeyboardHook = nullptr; - + winrt::com_ptr m_app; HWINEVENTHOOK m_objectLocationWinEventHook = nullptr; std::vector m_staticWinEventHooks; + EventWaiter m_exitEventWaiter; + DWORD m_mainThreadId; + void DisableModule() noexcept; void InitHooks(); diff --git a/src/modules/fancyzones/FancyZones/main.cpp b/src/modules/fancyzones/FancyZones/main.cpp index 3112df7fbb..4001673ea3 100644 --- a/src/modules/fancyzones/FancyZones/main.cpp +++ b/src/modules/fancyzones/FancyZones/main.cpp @@ -12,6 +12,8 @@ #include #include +#include + #include #include #include @@ -25,6 +27,9 @@ const std::wstring instanceMutexName = L"Local\\PowerToys_FancyZones_InstanceMut int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR lpCmdLine, _In_ int nCmdShow) { + Shared::Trace::ETWTrace trace{}; + trace.UpdateState(true); + winrt::init_apartment(); LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::fancyZonesLoggerName); @@ -82,6 +87,8 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, run_message_loop(); Trace::UnregisterProvider(); - + + trace.Flush(); + return 0; } diff --git a/src/modules/fancyzones/FancyZones/pch.h b/src/modules/fancyzones/FancyZones/pch.h index 472d051e25..291159e4e8 100644 --- a/src/modules/fancyzones/FancyZones/pch.h +++ b/src/modules/fancyzones/FancyZones/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/fancyzones/FancyZonesLib/pch.h b/src/modules/fancyzones/FancyZonesLib/pch.h index 70a402b0fa..d201dabd0c 100644 --- a/src/modules/fancyzones/FancyZonesLib/pch.h +++ b/src/modules/fancyzones/FancyZonesLib/pch.h @@ -8,11 +8,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/modules/fancyzones/FancyZonesLib/trace.cpp b/src/modules/fancyzones/FancyZonesLib/trace.cpp index 4c6024fe5a..69e341197a 100644 --- a/src/modules/fancyzones/FancyZonesLib/trace.cpp +++ b/src/modules/fancyzones/FancyZonesLib/trace.cpp @@ -10,6 +10,8 @@ #include "FancyZonesLib/FancyZonesDataTypes.h" #include "FancyZonesLib/util.h" +#include + // Telemetry strings should not be localized. #define LoggingProviderKey "Microsoft.PowerToys" @@ -108,19 +110,9 @@ ZoneSetInfo GetZoneSetInfo(_In_opt_ Layout* layout, const LayoutAssignedWindows& return info; } -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::FancyZones::EnableFancyZones(bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventEnableFancyZonesKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -130,7 +122,7 @@ void Trace::FancyZones::EnableFancyZones(bool enabled) noexcept void Trace::FancyZones::OnKeyDown(DWORD vkCode, bool win, bool control, bool inMoveSize) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventKeyDownKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -211,7 +203,7 @@ void Trace::FancyZones::DataChanged() noexcept activeZoneSetInfo += L", custom zone data was deleted"; } } - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventZoneSettingsChangedKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -226,7 +218,7 @@ void Trace::FancyZones::DataChanged() noexcept void Trace::FancyZones::EditorLaunched(int value) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventEditorLaunchKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -237,7 +229,7 @@ void Trace::FancyZones::EditorLaunched(int value) noexcept // Log if an error occurs in FZ void Trace::FancyZones::Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "FancyZones_Error", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -249,7 +241,7 @@ void Trace::FancyZones::Error(const DWORD errorCode, std::wstring errorMessage, void Trace::FancyZones::QuickLayoutSwitched(bool shortcutUsed) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventQuickLayoutSwitchKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -260,7 +252,7 @@ void Trace::FancyZones::QuickLayoutSwitched(bool shortcutUsed) noexcept void Trace::FancyZones::SnapNewWindowIntoZone(Layout* activeLayout, const LayoutAssignedWindows& layoutWindows) noexcept { auto const zoneInfo = GetZoneSetInfo(activeLayout, layoutWindows); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventSnapNewWindowIntoZone, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -273,7 +265,7 @@ void Trace::FancyZones::SnapNewWindowIntoZone(Layout* activeLayout, const Layout void Trace::FancyZones::KeyboardSnapWindowToZone(Layout* activeLayout, const LayoutAssignedWindows& layoutWindows) noexcept { auto const zoneInfo = GetZoneSetInfo(activeLayout, layoutWindows); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventKeyboardSnapWindowToZone, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -299,7 +291,7 @@ void Trace::SettingsTelemetry(const Settings& settings) noexcept auto nextTabHotkeyStr = HotKeyToString(settings.nextTabHotkey); auto prevTabHotkeyStr = HotKeyToString(settings.prevTabHotkey); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventSettingsKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -337,7 +329,7 @@ void Trace::SettingsTelemetry(const Settings& settings) noexcept void Trace::VirtualDesktopChanged() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventDesktopChangedKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -346,7 +338,7 @@ void Trace::VirtualDesktopChanged() noexcept void Trace::WorkArea::KeyUp(WPARAM wParam) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventWorkAreaKeyUpKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -357,7 +349,7 @@ void Trace::WorkArea::KeyUp(WPARAM wParam) noexcept void Trace::WorkArea::MoveOrResizeStarted(_In_opt_ Layout* activeLayout, const LayoutAssignedWindows& layoutWindows) noexcept { auto const zoneInfo = GetZoneSetInfo(activeLayout, layoutWindows); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventMoveOrResizeStartedKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -370,7 +362,7 @@ void Trace::WorkArea::MoveOrResizeStarted(_In_opt_ Layout* activeLayout, const L void Trace::WorkArea::MoveOrResizeEnd(_In_opt_ Layout* activeLayout, const LayoutAssignedWindows& layoutWindows) noexcept { auto const zoneInfo = GetZoneSetInfo(activeLayout, layoutWindows); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventMoveOrResizeEndedKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -383,7 +375,7 @@ void Trace::WorkArea::MoveOrResizeEnd(_In_opt_ Layout* activeLayout, const Layou void Trace::WorkArea::CycleActiveZoneSet(_In_opt_ Layout* activeLayout, const LayoutAssignedWindows& layoutWindows, InputMode mode) noexcept { auto const zoneInfo = GetZoneSetInfo(activeLayout, layoutWindows); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, EventCycleActiveZoneSetKey, ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/fancyzones/FancyZonesLib/trace.h b/src/modules/fancyzones/FancyZonesLib/trace.h index 3bef5cc8c1..db4206fd1f 100644 --- a/src/modules/fancyzones/FancyZonesLib/trace.h +++ b/src/modules/fancyzones/FancyZonesLib/trace.h @@ -1,16 +1,15 @@ #pragma once +#include + struct Settings; class Layout; class LayoutAssignedWindows; -class Trace +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - - class FancyZones + class FancyZones : public telemetry::TraceBase { public: static void EnableFancyZones(bool enabled) noexcept; @@ -26,7 +25,7 @@ public: static void SettingsTelemetry(const Settings& settings) noexcept; static void VirtualDesktopChanged() noexcept; - class WorkArea + class WorkArea : public telemetry::TraceBase { public: enum class InputMode diff --git a/src/modules/fancyzones/FancyZonesModuleInterface/dllmain.cpp b/src/modules/fancyzones/FancyZonesModuleInterface/dllmain.cpp index 40d0aea08f..f138c43200 100644 --- a/src/modules/fancyzones/FancyZonesModuleInterface/dllmain.cpp +++ b/src/modules/fancyzones/FancyZonesModuleInterface/dllmain.cpp @@ -205,8 +205,9 @@ private: if (m_hProcess) { - TerminateProcess(m_hProcess, 0); SendFZECloseEvent(); + WaitForSingleObject(m_hProcess, 1500); + TerminateProcess(m_hProcess, 0); m_hProcess = nullptr; } } diff --git a/src/modules/fancyzones/FancyZonesModuleInterface/pch.h b/src/modules/fancyzones/FancyZonesModuleInterface/pch.h index d70de4e4d4..9dc1f70972 100644 --- a/src/modules/fancyzones/FancyZonesModuleInterface/pch.h +++ b/src/modules/fancyzones/FancyZonesModuleInterface/pch.h @@ -5,7 +5,5 @@ #include #include #include -#include -#include #include #include diff --git a/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj b/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj index f1c2e8975e..72f540c0dc 100644 --- a/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj +++ b/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj @@ -1,5 +1,6 @@ - + 16.0 @@ -83,6 +84,7 @@ + diff --git a/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj b/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj index 913e885fa5..e3303f759b 100644 --- a/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj +++ b/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj @@ -131,6 +131,9 @@ MakeAppx.exe pack /d . /p $(OutDir)ImageResizerContextMenuPackage.msix /nv {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {18b3db45-4ffe-4d01-97d6-5223feee1853} diff --git a/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp b/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp index 347475fd90..31335d59a3 100644 --- a/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp +++ b/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -20,6 +21,7 @@ using namespace Microsoft::WRL; HINSTANCE g_hInst = 0; +Shared::Trace::ETWTrace trace(L"ImageResizerContextMenu"); #define BUFSIZE 4096 * 4 @@ -134,6 +136,7 @@ public: IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept try { + trace.UpdateState(true); Trace::Invoked(); HRESULT hr = S_OK; @@ -145,6 +148,9 @@ public: Trace::InvokedRet(hr); + trace.UpdateState(false); + trace.Flush(); + return hr; } CATCH_RETURN(); diff --git a/src/modules/imageresizer/ImageResizerLib/pch.h b/src/modules/imageresizer/ImageResizerLib/pch.h index dcca9b830b..3664d7390e 100644 --- a/src/modules/imageresizer/ImageResizerLib/pch.h +++ b/src/modules/imageresizer/ImageResizerLib/pch.h @@ -13,6 +13,4 @@ #include #include -#include - #endif //PCH_H diff --git a/src/modules/imageresizer/ImageResizerLib/trace.cpp b/src/modules/imageresizer/ImageResizerLib/trace.cpp index 352af3676a..1c0caef2c3 100644 --- a/src/modules/imageresizer/ImageResizerLib/trace.cpp +++ b/src/modules/imageresizer/ImageResizerLib/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnableImageResizer(_In_ bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ImageResizer_EnableImageResizer", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -28,10 +20,9 @@ void Trace::EnableImageResizer(_In_ bool enabled) noexcept TraceLoggingBoolean(enabled, "Enabled")); } - void Trace::Invoked() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ImageResizer_Invoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -40,7 +31,7 @@ void Trace::Invoked() noexcept void Trace::InvokedRet(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ImageResizer_InvokedRet", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -50,7 +41,7 @@ void Trace::InvokedRet(_In_ HRESULT hr) noexcept void Trace::QueryContextMenuError(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "ImageResizer_QueryContextMenuError", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/imageresizer/ImageResizerLib/trace.h b/src/modules/imageresizer/ImageResizerLib/trace.h index 9ff1e49f4e..a337e70b03 100644 --- a/src/modules/imageresizer/ImageResizerLib/trace.h +++ b/src/modules/imageresizer/ImageResizerLib/trace.h @@ -1,10 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void EnableImageResizer(_In_ bool enabled) noexcept; static void Invoked() noexcept; static void InvokedRet(_In_ HRESULT hr) noexcept; diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.cpp b/src/modules/imageresizer/dll/ContextMenuHandler.cpp index dd86eed5fb..32eced1608 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.cpp +++ b/src/modules/imageresizer/dll/ContextMenuHandler.cpp @@ -161,8 +161,13 @@ HRESULT CContextMenuHandler::QueryContextMenu(_In_ HMENU hmenu, UINT indexMenu, if (!InsertMenuItem(hmenu, indexMenu, TRUE, &mii)) { + m_etwTrace.UpdateState(true); + hr = HRESULT_FROM_WIN32(GetLastError()); Trace::QueryContextMenuError(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); } else { @@ -193,6 +198,8 @@ HRESULT CContextMenuHandler::GetCommandString(UINT_PTR idCmd, UINT uType, _In_ U HRESULT CContextMenuHandler::InvokeCommand(_In_ CMINVOKECOMMANDINFO* pici) { + m_etwTrace.UpdateState(true); + BOOL fUnicode = FALSE; Trace::Invoked(); HRESULT hr = E_FAIL; @@ -216,6 +223,10 @@ HRESULT CContextMenuHandler::InvokeCommand(_In_ CMINVOKECOMMANDINFO* pici) hr = ResizePictures(pici, nullptr); } Trace::InvokedRet(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); + return hr; } @@ -427,8 +438,14 @@ HRESULT __stdcall CContextMenuHandler::EnumSubCommands(IEnumExplorerCommand** pp // psiItemArray contains the list of files that have been selected when the context menu entry is invoked HRESULT __stdcall CContextMenuHandler::Invoke(IShellItemArray* psiItemArray, IBindCtx* /*pbc*/) { + m_etwTrace.UpdateState(true); + Trace::Invoked(); HRESULT hr = ResizePictures(nullptr, psiItemArray); Trace::InvokedRet(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); + return hr; } diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.h b/src/modules/imageresizer/dll/ContextMenuHandler.h index ba1465df88..abcadfa972 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.h +++ b/src/modules/imageresizer/dll/ContextMenuHandler.h @@ -5,6 +5,7 @@ #include "pch.h" #include "Generated Files/resource.h" #include "ImageResizerExt_i.h" +#include #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA) #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms." @@ -53,6 +54,7 @@ private: HBITMAP m_hbmpIcon = nullptr; std::wstring context_menu_caption; std::wstring context_menu_caption_here; + Shared::Trace::ETWTrace m_etwTrace{ L"ImageResizerExt" }; }; OBJECT_ENTRY_AUTO(__uuidof(ContextMenuHandler), CContextMenuHandler) \ No newline at end of file diff --git a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj index 90bcd8e357..df038e2c43 100644 --- a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj +++ b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj @@ -80,12 +80,14 @@ false - + + false - + + Create @@ -120,6 +122,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/imageresizer/dll/pch.h b/src/modules/imageresizer/dll/pch.h index 4fef14e85a..a6dd9999a9 100644 --- a/src/modules/imageresizer/dll/pch.h +++ b/src/modules/imageresizer/dll/pch.h @@ -22,4 +22,3 @@ #include #include -#include diff --git a/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.cpp b/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.cpp index 260e4c1f5c..5b18b791f0 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.cpp @@ -80,7 +80,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, std::wstring keysForShortcutToEdit = L""; std::wstring action = L""; - // do some parsing of the cmdline arg to see if we need to behave different // like, single edit mode, or "delete" mode. // These extra args are from "OpenEditor" in the KeyboardManagerViewModel diff --git a/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.vcxproj index 149ec0201a..1cc89c157b 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.vcxproj +++ b/src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.vcxproj @@ -132,6 +132,9 @@ {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditKeyboardWindow.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditKeyboardWindow.cpp index 6bf0994e3f..3597107808 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditKeyboardWindow.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditKeyboardWindow.cpp @@ -8,6 +8,8 @@ #include #include +#include + #include #include @@ -426,11 +428,15 @@ inline void CreateEditKeyboardWindowImpl(HINSTANCE hInst, KBMEditor::KeyboardMan void CreateEditKeyboardWindow(HINSTANCE hInst, KBMEditor::KeyboardManagerState& keyboardManagerState, MappingConfiguration& mappingConfiguration) { + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + // Move implementation into the separate method so resources get destroyed correctly CreateEditKeyboardWindowImpl(hInst, keyboardManagerState, mappingConfiguration); // Calling ClearXamlIslands() outside of the message loop is not enough to prevent // Microsoft.UI.XAML.dll from crashing during deinitialization, see https://github.com/microsoft/PowerToys/issues/10906 + trace.Flush(); Logger::trace("Terminating process {}", GetCurrentProcessId()); Logger::flush(); TerminateProcess(GetCurrentProcess(), 0); diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditShortcutsWindow.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditShortcutsWindow.cpp index c85c36cde2..0a2f044765 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditShortcutsWindow.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditShortcutsWindow.cpp @@ -6,6 +6,8 @@ #include #include +#include + #include "KeyboardManagerState.h" #include "Dialog.h" #include "KeyDropDownControl.h" @@ -447,11 +449,15 @@ inline void CreateEditShortcutsWindowImpl(HINSTANCE hInst, KBMEditor::KeyboardMa void CreateEditShortcutsWindow(HINSTANCE hInst, KBMEditor::KeyboardManagerState& keyboardManagerState, MappingConfiguration& mappingConfiguration, std::wstring keysForShortcutToEdit, std::wstring action) { + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + // Move implementation into the separate method so resources get destroyed correctly CreateEditShortcutsWindowImpl(hInst, keyboardManagerState, mappingConfiguration, keysForShortcutToEdit, action); // Calling ClearXamlIslands() outside of the message loop is not enough to prevent // Microsoft.UI.XAML.dll from crashing during deinitialization, see https://github.com/microsoft/PowerToys/issues/10906 + trace.Flush(); Logger::trace("Terminating process {}", GetCurrentProcessId()); Logger::flush(); TerminateProcess(GetCurrentProcess(), 0); diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/pch.h b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/pch.h index ffc3ff39aa..316ab36e42 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/pch.h +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/pch.h @@ -29,8 +29,6 @@ #include #include -#include - #include //#include diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.cpp index 290b11cc41..54ec7539b1 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log number of key remaps when the user uses Edit Keyboard and saves settings void Trace::KeyRemapCount(const DWORD keyToKeyCount, const DWORD keyToShortcutCount, const DWORD keyToTextCount) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_KeyRemapCount", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -35,7 +27,7 @@ void Trace::KeyRemapCount(const DWORD keyToKeyCount, const DWORD keyToShortcutCo // Log number of os level shortcut remaps when the user uses Edit Shortcuts and saves settings void Trace::OSLevelShortcutRemapCount(const DWORD shortcutToShortcutCount, const DWORD shortcutToKeyCount) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_OSLevelShortcutRemapCount", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -48,7 +40,7 @@ void Trace::OSLevelShortcutRemapCount(const DWORD shortcutToShortcutCount, const // Log number of app specific shortcut remaps when the user uses Edit Shortcuts and saves settings void Trace::AppSpecificShortcutRemapCount(const DWORD shortcutToShortcutCount, const DWORD shortcutToKeyCount) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_AppSpecificShortcutRemapCount", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -61,7 +53,7 @@ void Trace::AppSpecificShortcutRemapCount(const DWORD shortcutToShortcutCount, c // Log if an error occurs in KBM void Trace::Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_Error", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.h b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.h index b91f5b625b..9c219bf8e8 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.h +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log number of key remaps when the user uses Edit Keyboard and saves settings static void KeyRemapCount(const DWORD keyToKeyCount, const DWORD keyToShortcutCount, const DWORD keyToTextCount) noexcept; diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorTest/pch.h b/src/modules/keyboardmanager/KeyboardManagerEditorTest/pch.h index 6364eacd48..4cf0be54c2 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorTest/pch.h +++ b/src/modules/keyboardmanager/KeyboardManagerEditorTest/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj index 55d97e0b00..fd7b4a97c3 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj +++ b/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj @@ -67,6 +67,9 @@ {6955446d-23f7-4023-9bb3-8657f904af99} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {e496b7fc-1e99-4bab-849b-0e8367040b02} diff --git a/src/modules/keyboardmanager/KeyboardManagerEngine/main.cpp b/src/modules/keyboardmanager/KeyboardManagerEngine/main.cpp index 31417e9c23..5969ed6cfd 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngine/main.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEngine/main.cpp @@ -1,4 +1,6 @@ #include "pch.h" +#include +#include #include #include #include @@ -8,6 +10,7 @@ #include #include #include +#include const std::wstring instanceMutexName = L"Local\\PowerToys_KBMEngine_InstanceMutex"; @@ -19,6 +22,9 @@ int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, winrt::init_apartment(); LoggerHelpers::init_logger(KeyboardManagerConstants::ModuleName, L"Engine", LogSettings::keyboardManagerLoggerName); + Shared::Trace::ETWTrace trace; + trace.UpdateState(true); + if (powertoys_gpo::getConfiguredKeyboardManagerEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled) { Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); @@ -42,9 +48,15 @@ int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, Trace::RegisterProvider(); std::wstring pid = std::wstring(lpCmdLine); + + auto mainThreadId = GetCurrentThreadId(); + + EventWaiter ev = EventWaiter(CommonSharedConstants::TERMINATE_KBM_SHARED_EVENT, [&](int) { + PostThreadMessage(mainThreadId, WM_QUIT, 0, 0); + }); + if (!pid.empty()) { - auto mainThreadId = GetCurrentThreadId(); ProcessWaiter::OnProcessTerminate(pid, [mainThreadId](int err) { if (err != ERROR_SUCCESS) { @@ -73,5 +85,7 @@ int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, kbm.StopLowlevelKeyboardHook(); Trace::UnregisterProvider(); + trace.Flush(); + return 0; } diff --git a/src/modules/keyboardmanager/KeyboardManagerEngine/pch.h b/src/modules/keyboardmanager/KeyboardManagerEngine/pch.h index 472d051e25..291159e4e8 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngine/pch.h +++ b/src/modules/keyboardmanager/KeyboardManagerEngine/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/pch.h b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/pch.h index ded05a85a7..817bab9a85 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/pch.h +++ b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.cpp b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.cpp index fd11255283..ab3e49cb87 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.cpp @@ -2,6 +2,8 @@ #include "trace.h" #include +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -9,74 +11,64 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if a key to key remap has been invoked today. void Trace::DailyKeyToKeyRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyKeyToKeyRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyKeyToKeyRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if a key to shortcut remap has been invoked today. void Trace::DailyKeyToShortcutRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyKeyToShortcutRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyKeyToShortcutRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if a shortcut to key remap has been invoked today. void Trace::DailyShortcutToKeyRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyShortcutToKeyRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyShortcutToKeyRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if a shortcut to shortcut remap has been invoked today. void Trace::DailyShortcutToShortcutRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyShortcutToShortcutRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyShortcutToShortcutRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if an app specific shortcut to key remap has been invoked today. void Trace::DailyAppSpecificShortcutToKeyRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyAppSpecificShortcutToKeyRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyAppSpecificShortcutToKeyRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if an app specific shortcut to shortcut remap has been invoked today. void Trace::DailyAppSpecificShortcutToShortcutRemapInvoked() noexcept { - TraceLoggingWrite( - g_hProvider, - "KeyboardManager_DailyAppSpecificShortcutToShortcutRemapInvoked", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); + TraceLoggingWriteWrapper( + g_hProvider, + "KeyboardManager_DailyAppSpecificShortcutToShortcutRemapInvoked", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } // Log if a key remap has been invoked (not being used currently, due to being garrulous) @@ -84,7 +76,7 @@ void Trace::KeyRemapInvoked(bool isKeyToKey) noexcept { if (isKeyToKey) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_KeyToKeyRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -92,7 +84,7 @@ void Trace::KeyRemapInvoked(bool isKeyToKey) noexcept } else { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_KeyToShortcutRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -107,7 +99,7 @@ void Trace::ShortcutRemapInvoked(bool isShortcutToShortcut, bool isAppSpecific) { if (isShortcutToShortcut) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_AppSpecificShortcutToShortcutRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -115,7 +107,7 @@ void Trace::ShortcutRemapInvoked(bool isShortcutToShortcut, bool isAppSpecific) } else { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_AppSpecificShortcutToKeyRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -126,7 +118,7 @@ void Trace::ShortcutRemapInvoked(bool isShortcutToShortcut, bool isAppSpecific) { if (isShortcutToShortcut) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_OSLevelShortcutToShortcutRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -134,7 +126,7 @@ void Trace::ShortcutRemapInvoked(bool isShortcutToShortcut, bool isAppSpecific) } else { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_OSLevelShortcutToKeyRemapInvoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -144,7 +136,7 @@ void Trace::ShortcutRemapInvoked(bool isShortcutToShortcut, bool isAppSpecific) } // Function to return a human readable string for the shortcut -std::wstring GetShortcutHumanReadableString(Shortcut const & shortcut, LayoutMap& keyboardMap) +std::wstring GetShortcutHumanReadableString(Shortcut const& shortcut, LayoutMap& keyboardMap) { std::wstring humanReadableShortcut = L""; if (shortcut.winKey != ModifierKey::Disabled) @@ -184,7 +176,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce if (keyRemap.second.index() == 0) // 0 - Remapping to key { DWORD keyRemappedTo = std::get(keyRemap.second); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_KeyRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -192,13 +184,12 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce TraceLoggingInt64(keyRemap.first, "KeyRemapFrom"), TraceLoggingInt64(keyRemappedTo, "KeyRemapTo"), TraceLoggingWideString(keyboardMap.GetKeyName(keyRemap.first).c_str(), "HumanRemapFrom"), - TraceLoggingWideString(keyboardMap.GetKeyName(keyRemappedTo).c_str(), "HumanRemapTo") - ); + TraceLoggingWideString(keyboardMap.GetKeyName(keyRemappedTo).c_str(), "HumanRemapTo")); } else if (keyRemap.second.index() == 1) // 1 - Remapping to shortcut { Shortcut shortcutRemappedTo = std::get(keyRemap.second); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_KeyRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -210,8 +201,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce TraceLoggingInt8(static_cast(shortcutRemappedTo.altKey), "ModifierRemapToAlt"), TraceLoggingInt8(static_cast(shortcutRemappedTo.shiftKey), "ModifierRemapToShift"), TraceLoggingWideString(keyboardMap.GetKeyName(keyRemap.first).c_str(), "HumanRemapFrom"), - TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedTo, keyboardMap).c_str(), "HumanRemapTo") - ); + TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedTo, keyboardMap).c_str(), "HumanRemapTo")); } } @@ -221,7 +211,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce if (shortcutRemap.second.targetShortcut.index() == 0) // 0 - Remapping to key { DWORD keyRemappedTo = std::get(shortcutRemap.second.targetShortcut); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_ShortcutRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -245,7 +235,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce // Don't include Start app or Open URI mappings in this telemetry. continue; } - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_ShortcutRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -263,8 +253,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce TraceLoggingInt8(static_cast(shortcutRemappedTo.altKey), "ModifierRemapToAlt"), TraceLoggingInt8(static_cast(shortcutRemappedTo.shiftKey), "ModifierRemapToShift"), TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedFrom, keyboardMap).c_str(), "HumanRemapFrom"), - TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedTo, keyboardMap).c_str(), "HumanRemapTo") - ); + TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedTo, keyboardMap).c_str(), "HumanRemapTo")); } } @@ -277,7 +266,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce if (shortcutRemap.second.targetShortcut.index() == 0) // 0 - Remapping to key { DWORD keyRemappedTo = std::get(shortcutRemap.second.targetShortcut); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_AppSpecificShortcutRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -292,8 +281,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce TraceLoggingInt64(keyRemappedTo, "KeyRemapTo"), TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedFrom, keyboardMap).c_str(), "HumanRemapFrom"), TraceLoggingWideString(keyboardMap.GetKeyName(keyRemappedTo).c_str(), "HumanRemapTo"), - TraceLoggingWideString(appName.c_str(), "TargetApp") - ); + TraceLoggingWideString(appName.c_str(), "TargetApp")); } else if (shortcutRemap.second.targetShortcut.index() == 1) // 1 - Remapping to shortcut { @@ -303,7 +291,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce // Don't include Start app or Open URI mappings in this telemetry. continue; } - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_AppSpecificShortcutRemapConfigurationLoaded", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -322,8 +310,7 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce TraceLoggingInt8(static_cast(shortcutRemappedTo.shiftKey), "ModifierRemapToShift"), TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedFrom, keyboardMap).c_str(), "HumanRemapFrom"), TraceLoggingWideString(GetShortcutHumanReadableString(shortcutRemappedTo, keyboardMap).c_str(), "HumanRemapTo"), - TraceLoggingWideString(appName.c_str(), "TargetApp") - ); + TraceLoggingWideString(appName.c_str(), "TargetApp")); } } } @@ -332,18 +319,17 @@ void Trace::SendKeyAndShortcutRemapLoadedConfiguration(State& remappings) noexce // Log an error while trying to send remappings telemetry. void Trace::ErrorSendingKeyAndShortcutRemapLoadedConfiguration() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_ErrorSendingKeyAndShortcutRemapLoadedConfiguration", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } - // Log if an error occurs in KBM void Trace::Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_Error", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.h b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.h index 9408a38e0e..8a91eef9c4 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.h +++ b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/trace.h @@ -2,12 +2,11 @@ #include "State.h" -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if a key to key remap has been invoked today. static void DailyKeyToKeyRemapInvoked() noexcept; diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineTest/pch.h b/src/modules/keyboardmanager/KeyboardManagerEngineTest/pch.h index 6364eacd48..4cf0be54c2 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEngineTest/pch.h +++ b/src/modules/keyboardmanager/KeyboardManagerEngineTest/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/keyboardmanager/common/pch.h b/src/modules/keyboardmanager/common/pch.h index e01018e71e..48c81b6caf 100644 --- a/src/modules/keyboardmanager/common/pch.h +++ b/src/modules/keyboardmanager/common/pch.h @@ -6,4 +6,3 @@ #include #include #include -#include \ No newline at end of file diff --git a/src/modules/keyboardmanager/dll/dllmain.cpp b/src/modules/keyboardmanager/dll/dllmain.cpp index e76fd5f716..11fe776281 100644 --- a/src/modules/keyboardmanager/dll/dllmain.cpp +++ b/src/modules/keyboardmanager/dll/dllmain.cpp @@ -8,6 +8,7 @@ #include #include #include +#include BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/) { @@ -42,6 +43,8 @@ private: HANDLE m_hProcess = nullptr; + HANDLE m_hTerminateEngineEvent = nullptr; + public: // Constructor KeyboardManager() @@ -51,6 +54,17 @@ public: std::filesystem::path oldLogPath(PTSettingsHelper::get_module_save_folder_location(app_key)); oldLogPath.append("Logs"); LoggerHelpers::delete_old_log_folder(oldLogPath); + + m_hTerminateEngineEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_KBM_SHARED_EVENT); + if (!m_hTerminateEngineEvent) + { + Logger::error(L"Failed to create terminate Engine event"); + auto message = get_last_error_message(GetLastError()); + if (message.has_value()) + { + Logger::error(message.value()); + } + } }; // Destroy the powertoy and free memory @@ -158,6 +172,9 @@ public: if (m_hProcess) { + SetEvent(m_hTerminateEngineEvent); + WaitForSingleObject(m_hProcess, 1500); + TerminateProcess(m_hProcess, 0); m_hProcess = nullptr; } diff --git a/src/modules/keyboardmanager/dll/pch.h b/src/modules/keyboardmanager/dll/pch.h index c4c30cb1ea..350550e299 100644 --- a/src/modules/keyboardmanager/dll/pch.h +++ b/src/modules/keyboardmanager/dll/pch.h @@ -1,7 +1,6 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/modules/keyboardmanager/dll/trace.cpp b/src/modules/keyboardmanager/dll/trace.cpp index 798204cae8..82057baefb 100644 --- a/src/modules/keyboardmanager/dll/trace.cpp +++ b/src/modules/keyboardmanager/dll/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has KBM enabled or disabled - Can also be used to see how often users have to restart the keyboard hook void Trace::EnableKeyboardManager(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "KeyboardManager_EnableKeyboardManager", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/keyboardmanager/dll/trace.h b/src/modules/keyboardmanager/dll/trace.h index fab670a364..55e5ff6867 100644 --- a/src/modules/keyboardmanager/dll/trace.h +++ b/src/modules/keyboardmanager/dll/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; - // Log if the user has KBM enabled or disabled - Can also be used to see how often users have to restart the keyboard hook static void EnableKeyboardManager(const bool enabled) noexcept; }; diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj index fc1f8a1c85..8dc2df71bf 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj @@ -1,5 +1,6 @@ - + @@ -46,14 +47,12 @@ - Create - diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters index 81c3649d1e..5e8c2b6605 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters @@ -3,11 +3,9 @@ - - Generated Files diff --git a/src/modules/launcher/Microsoft.Launcher/dllmain.cpp b/src/modules/launcher/Microsoft.Launcher/dllmain.cpp index e140fb728e..99c492c394 100644 --- a/src/modules/launcher/Microsoft.Launcher/dllmain.cpp +++ b/src/modules/launcher/Microsoft.Launcher/dllmain.cpp @@ -2,7 +2,6 @@ #include #include #include -#include "trace.h" #include "Generated Files/resource.h" #include #include @@ -34,13 +33,11 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: - Trace::RegisterProvider(); break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: - Trace::UnregisterProvider(); break; } diff --git a/src/modules/launcher/Microsoft.Launcher/pch.h b/src/modules/launcher/Microsoft.Launcher/pch.h index 46fc911b44..c7e646b15e 100644 --- a/src/modules/launcher/Microsoft.Launcher/pch.h +++ b/src/modules/launcher/Microsoft.Launcher/pch.h @@ -3,6 +3,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/launcher/Microsoft.Launcher/trace.cpp b/src/modules/launcher/Microsoft.Launcher/trace.cpp deleted file mode 100644 index 3e5c2083a9..0000000000 --- a/src/modules/launcher/Microsoft.Launcher/trace.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "pch.h" -#include "trace.h" - -TRACELOGGING_DEFINE_PROVIDER( - g_hProvider, - "Microsoft.PowerToys", - // {38e8889b-9731-53f5-e901-e8a7c1753074} - (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), - TraceLoggingOptionProjectTelemetry()); - -void Trace::RegisterProvider() { - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() { - TraceLoggingUnregister(g_hProvider); -} diff --git a/src/modules/launcher/Microsoft.Launcher/trace.h b/src/modules/launcher/Microsoft.Launcher/trace.h deleted file mode 100644 index 1a260e8824..0000000000 --- a/src/modules/launcher/Microsoft.Launcher/trace.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -class Trace { -public: - static void RegisterProvider(); - static void UnregisterProvider(); -}; diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 86255f3ad7..f110bf7142 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -46,6 +46,7 @@ namespace PowerLauncher private SettingWindowViewModel _settingsVM; private StringMatcher _stringMatcher; private SettingsReader _settingsReader; + private ETWTrace etwTrace = new ETWTrace(); // To prevent two disposals running at the same time. private static readonly object _disposingLock = new object(); @@ -101,6 +102,8 @@ namespace PowerLauncher () => { Log.Warn("RunExitEvent was signaled. Exiting PowerToys", typeof(App)); + application.etwTrace?.Dispose(); + application.etwTrace = null; ExitPowerToys(application); }, Application.Current.Dispatcher, @@ -111,6 +114,8 @@ namespace PowerLauncher RunnerHelper.WaitForPowerToysRunner(powerToysPid, () => { Log.Info($"Runner with pid={powerToysPid} exited. Exiting PowerToys Run", typeof(App)); + application.etwTrace?.Dispose(); + application.etwTrace = null; ExitPowerToys(application); }); } diff --git a/src/modules/peek/Peek.UI/PeekXAML/App.xaml.cs b/src/modules/peek/Peek.UI/PeekXAML/App.xaml.cs index 6df56d6f46..a433b00e43 100644 --- a/src/modules/peek/Peek.UI/PeekXAML/App.xaml.cs +++ b/src/modules/peek/Peek.UI/PeekXAML/App.xaml.cs @@ -26,6 +26,8 @@ namespace Peek.UI { public static int PowerToysPID { get; set; } + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); + public IHost Host { get; @@ -100,12 +102,18 @@ namespace Peek.UI { RunnerHelper.WaitForPowerToysRunner(powerToysRunnerPid, () => { + EtwTrace?.Dispose(); Environment.Exit(0); }); } } NativeEventWaiter.WaitForEventLoop(Constants.ShowPeekEvent(), OnPeekHotkey); + NativeEventWaiter.WaitForEventLoop(Constants.TerminatePeekEvent(), () => + { + EtwTrace?.Dispose(); + Environment.Exit(0); + }); } private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) diff --git a/src/modules/peek/peek/dllmain.cpp b/src/modules/peek/peek/dllmain.cpp index cef7c1cf9e..5fd4da8039 100644 --- a/src/modules/peek/peek/dllmain.cpp +++ b/src/modules/peek/peek/dllmain.cpp @@ -13,8 +13,8 @@ extern "C" IMAGE_DOS_HEADER __ImageBase; -BOOL APIENTRY DllMain(HMODULE /*hModule*/, - DWORD ul_reason_for_call, +BOOL APIENTRY DllMain(HMODULE /*hModule*/, + DWORD ul_reason_for_call, LPVOID /*lpReserved*/) { switch (ul_reason_for_call) @@ -65,6 +65,7 @@ private: DWORD m_processPid = 0; HANDLE m_hInvokeEvent; + HANDLE m_hTerminateEvent; // Load the settings file. void init_settings() @@ -163,7 +164,7 @@ private: { return false; } - if (wcsncmp(className, L"Progman", MAX_PATH) !=0 && wcsncmp(className, L"WorkerW", MAX_PATH) != 0) + if (wcsncmp(className, L"Progman", MAX_PATH) != 0 && wcsncmp(className, L"WorkerW", MAX_PATH) != 0) { return false; } @@ -239,7 +240,7 @@ private: } DWORD pid{}; - if (GetWindowThreadProcessId(foregroundWindowHandle, &pid)!=0) + if (GetWindowThreadProcessId(foregroundWindowHandle, &pid) != 0) { // If the foreground window is the Peek window, send activation signal. if (m_processPid != 0 && pid == m_processPid) @@ -321,6 +322,7 @@ public: init_settings(); m_hInvokeEvent = CreateDefaultEvent(CommonSharedConstants::SHOW_PEEK_SHARED_EVENT); + m_hTerminateEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_PEEK_SHARED_EVENT); }; ~Peek() @@ -402,6 +404,8 @@ public: if (m_enabled) { ResetEvent(m_hInvokeEvent); + SetEvent(m_hTerminateEvent); + WaitForSingleObject(m_hProcess, 1500); auto result = TerminateProcess(m_hProcess, 1); if (result == 0) { diff --git a/src/modules/peek/peek/pch.h b/src/modules/peek/peek/pch.h index eddac0fdc1..329705f63b 100644 --- a/src/modules/peek/peek/pch.h +++ b/src/modules/peek/peek/pch.h @@ -2,6 +2,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/peek/peek/trace.cpp b/src/modules/peek/peek/trace.cpp index 1089b41ef8..529abb94f3 100644 --- a/src/modules/peek/peek/trace.cpp +++ b/src/modules/peek/peek/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has Peek enabled or disabled void Trace::EnablePeek(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Peek_EnablePeek", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnablePeek(const bool enabled) noexcept // Log if the user has invoked Peek void Trace::PeekInvoked() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Peek_InvokePeek", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -49,7 +41,7 @@ void Trace::SettingsTelemetry(PowertoyModuleIface::Hotkey& hotkey) noexcept std::wstring(hotkey.alt ? L"Alt + " : L"") + std::wstring(L"VK ") + std::to_wstring(hotkey.key); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Peek_Settings", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/peek/peek/trace.h b/src/modules/peek/peek/trace.h index 49cd45c32c..c250fc6b45 100644 --- a/src/modules/peek/peek/trace.h +++ b/src/modules/peek/peek/trace.h @@ -1,12 +1,11 @@ #pragma once #include -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has Peek enabled or disabled static void EnablePeek(const bool enabled) noexcept; diff --git a/src/modules/poweraccent/PowerAccent.UI/App.xaml.cs b/src/modules/poweraccent/PowerAccent.UI/App.xaml.cs index af86d06edd..297b5f2f7b 100644 --- a/src/modules/poweraccent/PowerAccent.UI/App.xaml.cs +++ b/src/modules/poweraccent/PowerAccent.UI/App.xaml.cs @@ -7,6 +7,7 @@ using System.Threading; using System.Windows; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; namespace PowerAccent.UI { @@ -17,6 +18,7 @@ namespace PowerAccent.UI { private static Mutex _mutex; private bool _disposed; + private ETWTrace _etwTrace = new ETWTrace(); protected override void OnStartup(StartupEventArgs e) { @@ -47,6 +49,7 @@ namespace PowerAccent.UI if (disposing) { _mutex?.Dispose(); + _etwTrace?.Dispose(); } _disposed = true; diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/pch.h b/src/modules/poweraccent/PowerAccentModuleInterface/pch.h index eddac0fdc1..329705f63b 100644 --- a/src/modules/poweraccent/PowerAccentModuleInterface/pch.h +++ b/src/modules/poweraccent/PowerAccentModuleInterface/pch.h @@ -2,6 +2,5 @@ #include #include #include -#include #include #include \ No newline at end of file diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/trace.cpp b/src/modules/poweraccent/PowerAccentModuleInterface/trace.cpp index c5f15cc216..8a063ea99f 100644 --- a/src/modules/poweraccent/PowerAccentModuleInterface/trace.cpp +++ b/src/modules/poweraccent/PowerAccentModuleInterface/trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,19 +10,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnablePowerAccent(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerAccent_EnablePowerAccent", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/trace.h b/src/modules/poweraccent/PowerAccentModuleInterface/trace.h index 42b812f535..4d729f7683 100644 --- a/src/modules/poweraccent/PowerAccentModuleInterface/trace.h +++ b/src/modules/poweraccent/PowerAccentModuleInterface/trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has PowerAccent enabled or disabled static void EnablePowerAccent(const bool enabled) noexcept; }; diff --git a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj index fb10229279..af3c71ad8e 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj +++ b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj @@ -132,6 +132,9 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {51920f1f-c28c-4adf-8660-4238766796c2} diff --git a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp index d3fe2af629..ce5669fde8 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp +++ b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp @@ -18,6 +18,7 @@ #include "Generated Files/resource.h" +#include #include #include #include @@ -32,6 +33,7 @@ using namespace Microsoft::WRL; HINSTANCE g_hInst = 0; +Shared::Trace::ETWTrace trace(L"PowerRenameContextMenu"); #define BUFSIZE 4096 * 4 @@ -203,6 +205,8 @@ private: { if (CSettingsInstance().GetEnabled()) { + trace.UpdateState(true); + Trace::Invoked(); // Set the application path based on the location of the dll std::wstring path = get_module_folderpath(g_hInst); @@ -258,6 +262,9 @@ private: } Trace::InvokedRet(S_OK); + trace.Flush(); + trace.UpdateState(false); + return S_OK; } diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj index 192a1528bd..c41e461acb 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj @@ -188,6 +188,9 @@ {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj.filters b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj.filters index 10ef9ed4ee..bc242e4886 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj.filters +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj.filters @@ -65,7 +65,4 @@ - - - \ No newline at end of file diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.cpp b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.cpp index d1c747fc65..46463af14e 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.cpp +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.cpp @@ -12,6 +12,8 @@ #include #include +#include + #include #include #include @@ -104,6 +106,8 @@ namespace winrt::PowerRenameUI::implementation MainWindow::MainWindow() : m_allSelected{ true }, m_managerEvents{ this } { + Trace::RegisterProvider(); + auto windowNative{ this->try_as<::IWindowNative>() }; winrt::check_bool(windowNative); windowNative->get_WindowHandle(&m_window); @@ -211,6 +215,8 @@ namespace winrt::PowerRenameUI::implementation InitializeComponent(); + m_etwTrace.UpdateState(true); + listView_ExplorerItems().ApplyTemplate(); #ifdef ENABLE_RECYCLING_VIRTUALIZATION_MODE if (auto scrollViewer = FindScrollViewer(listView_ExplorerItems()); scrollViewer) @@ -313,6 +319,11 @@ namespace winrt::PowerRenameUI::implementation { LastRunSettingsInstance().UpdateLastWindowSize(m_updatedWindowSize->first, m_updatedWindowSize->second); } + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); + + Trace::UnregisterProvider(); } void MainWindow::InvalidateItemListViewState() diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.h b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.h index d1edf5b226..8c70194f1b 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.h +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml.h @@ -5,6 +5,8 @@ #include "winrt/Windows.UI.Xaml.Interop.h" #include "winrt/Windows.UI.Xaml.Controls.Primitives.h" +#include + #include "MainWindow.g.h" #include "PatternSnippet.h" #include "ExplorerItem.h" @@ -143,6 +145,8 @@ namespace winrt::PowerRenameUI::implementation void SetCheckboxesFromFlags(DWORD flags); void UpdateCounts(); + Shared::Trace::ETWTrace m_etwTrace{}; + HWND m_window{}; bool m_disableCountUpdate = false; diff --git a/src/modules/powerrename/dll/PowerRenameExt.cpp b/src/modules/powerrename/dll/PowerRenameExt.cpp index 9e9f2910e7..5659f3a51c 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.cpp +++ b/src/modules/powerrename/dll/PowerRenameExt.cpp @@ -133,6 +133,8 @@ HRESULT CPowerRenameMenu::InvokeCommand(_In_ LPCMINVOKECOMMANDINFO pici) HRESULT CPowerRenameMenu::RunPowerRename(CMINVOKECOMMANDINFO* pici, IShellItemArray* psiItemArray) { + m_etwTrace.UpdateState(true); + HRESULT hr = E_FAIL; if (CSettingsInstance().GetEnabled() && @@ -246,6 +248,9 @@ HRESULT CPowerRenameMenu::RunPowerRename(CMINVOKECOMMANDINFO* pici, IShellItemAr } Trace::InvokedRet(hr); + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); + return hr; } @@ -295,6 +300,8 @@ HRESULT __stdcall CPowerRenameMenu::Invoke(IShellItemArray* psiItemArray, IBindC swprintf_s(buffer, L"%d", GetCurrentProcessId()); MessageBoxW(nullptr, buffer, L"PID", MB_OK); #endif + m_etwTrace.UpdateState(true); + Trace::Invoked(); InvokeStruct* pInvokeData = new (std::nothrow) InvokeStruct; HRESULT hr = E_OUTOFMEMORY; @@ -311,6 +318,9 @@ HRESULT __stdcall CPowerRenameMenu::Invoke(IShellItemArray* psiItemArray, IBindC hr = RunPowerRename(nullptr, psiItemArray); } Trace::InvokedRet(hr); + + m_etwTrace.Flush(); + m_etwTrace.UpdateState(false); return S_OK; } diff --git a/src/modules/powerrename/dll/PowerRenameExt.h b/src/modules/powerrename/dll/PowerRenameExt.h index e2ffcda85c..3d0ca78b9f 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.h +++ b/src/modules/powerrename/dll/PowerRenameExt.h @@ -1,6 +1,8 @@ #pragma once #include "pch.h" +#include + class __declspec(uuid("0440049F-D1DC-4E46-B27B-98393D79486B")) CPowerRenameMenu : public IShellExtInit, public IContextMenu, @@ -70,4 +72,6 @@ private: HBITMAP m_hbmpIcon = nullptr; CComPtr m_spdo; std::wstring context_menu_caption; + + Shared::Trace::ETWTrace m_etwTrace{ L"PowerRenameExt" }; }; diff --git a/src/modules/powerrename/dll/PowerRenameExt.vcxproj b/src/modules/powerrename/dll/PowerRenameExt.vcxproj index a994c25148..ead9518f35 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.vcxproj +++ b/src/modules/powerrename/dll/PowerRenameExt.vcxproj @@ -60,6 +60,9 @@ {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/modules/powerrename/lib/pch.h b/src/modules/powerrename/lib/pch.h index 7a12102fbe..c5a4711a03 100644 --- a/src/modules/powerrename/lib/pch.h +++ b/src/modules/powerrename/lib/pch.h @@ -29,6 +29,4 @@ #include #include -#include - #include diff --git a/src/modules/powerrename/lib/trace.cpp b/src/modules/powerrename/lib/trace.cpp index f04a085df0..9f1446c653 100644 --- a/src/modules/powerrename/lib/trace.cpp +++ b/src/modules/powerrename/lib/trace.cpp @@ -2,26 +2,18 @@ #include "trace.h" #include "Settings.h" +#include + TRACELOGGING_DEFINE_PROVIDER( - g_hProvider, - "Microsoft.PowerToys", - // {38e8889b-9731-53f5-e901-e8a7c1753074} - (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), - TraceLoggingOptionProjectTelemetry()); - -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} + g_hProvider, + "Microsoft.PowerToys", + // {38e8889b-9731-53f5-e901-e8a7c1753074} + (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), + TraceLoggingOptionProjectTelemetry()); void Trace::Invoked() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_Invoked", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -30,7 +22,7 @@ void Trace::Invoked() noexcept void Trace::InvokedRet(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_InvokedRet", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -40,7 +32,7 @@ void Trace::InvokedRet(_In_ HRESULT hr) noexcept void Trace::EnablePowerRename(_In_ bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_EnablePowerRename", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -50,7 +42,7 @@ void Trace::EnablePowerRename(_In_ bool enabled) noexcept void Trace::UIShownRet(_In_ HRESULT hr) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_UIShownRet", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -60,7 +52,7 @@ void Trace::UIShownRet(_In_ HRESULT hr) noexcept void Trace::RenameOperation(_In_ UINT totalItemCount, _In_ UINT selectedItemCount, _In_ UINT renameItemCount, _In_ DWORD flags, _In_ PCWSTR extensionList) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_RenameOperation", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -74,7 +66,7 @@ void Trace::RenameOperation(_In_ UINT totalItemCount, _In_ UINT selectedItemCoun void Trace::SettingsChanged() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerRename_SettingsChanged", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/powerrename/lib/trace.h b/src/modules/powerrename/lib/trace.h index 9019c9c8ae..0a3a0af246 100644 --- a/src/modules/powerrename/lib/trace.h +++ b/src/modules/powerrename/lib/trace.h @@ -1,9 +1,9 @@ #pragma once -class Trace { +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void Invoked() noexcept; static void InvokedRet(_In_ HRESULT hr) noexcept; static void EnablePowerRename(_In_ bool enabled) noexcept; diff --git a/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandlerControl.cs b/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandlerControl.cs index 67c6d9f42e..2fd96930a2 100644 --- a/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandlerControl.cs +++ b/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandlerControl.cs @@ -4,8 +4,6 @@ using Common; using Microsoft.PowerToys.FilePreviewCommon; -using Microsoft.PowerToys.PreviewHandler.Gcode.Telemetry.Events; -using Microsoft.PowerToys.Telemetry; namespace Microsoft.PowerToys.PreviewHandler.Gcode { @@ -86,13 +84,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode Resize += FormResized; base.DoPreview(fs); - try - { - PowerToysTelemetry.Log.WriteEvent(new GcodeFilePreviewed()); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } catch (Exception ex) { @@ -162,14 +153,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode /// Stream reference to access source file. private void PreviewError(Exception exception, T dataSource) { - try - { - PowerToysTelemetry.Log.WriteEvent(new GcodeFilePreviewError { Message = exception.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } - Controls.Clear(); _infoBarAdded = true; AddTextBoxControl(Properties.Resource.GcodeNotPreviewedError); diff --git a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFileHandlerLoaded.cs b/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFileHandlerLoaded.cs deleted file mode 100644 index c1d1fba40a..0000000000 --- a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFileHandlerLoaded.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Gcode.Telemetry.Events -{ - /// - /// A telemetry event to be raised when a svg file has been viewed in the preview pane. - /// - [EventData] - public class GcodeFileHandlerLoaded : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewError.cs b/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewError.cs deleted file mode 100644 index 9e9a232e04..0000000000 --- a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewError.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Gcode.Telemetry.Events -{ - /// - /// A telemetry event to be raised when an error has occurred in the preview pane. - /// - [EventData] - public class GcodeFilePreviewError : EventBase, IEvent - { - /// - /// Gets or sets the error message to log as part of the telemetry event. - /// - public string Message { get; set; } - - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance; - } -} diff --git a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewed.cs b/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewed.cs deleted file mode 100644 index 693e314e40..0000000000 --- a/src/modules/previewpane/GcodePreviewHandler/Telemetry/Events/GcodeFilePreviewed.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Gcode.Telemetry.Events -{ - /// - /// A telemetry event to be raised when a svg file has been viewed in the preview pane. - /// - [EventData] - public class GcodeFilePreviewed : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandlerControl.cs b/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandlerControl.cs index 89f480c792..bb4b1f869d 100644 --- a/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandlerControl.cs +++ b/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandlerControl.cs @@ -9,8 +9,6 @@ using System.Text.RegularExpressions; using Common; using Microsoft.PowerToys.PreviewHandler.Markdown.Properties; -using Microsoft.PowerToys.PreviewHandler.Markdown.Telemetry.Events; -using Microsoft.PowerToys.Telemetry; using Microsoft.Web.WebView2.Core; using Microsoft.Web.WebView2.WinForms; using Windows.System; @@ -217,25 +215,9 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown { } }); - - try - { - PowerToysTelemetry.Log.WriteEvent(new MarkdownFilePreviewed()); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } - catch (Exception ex) + catch (Exception) { - try - { - PowerToysTelemetry.Log.WriteEvent(new MarkdownFilePreviewError { Message = ex.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } - Controls.Clear(); _infoBarDisplayed = true; _infoBar = GetTextBoxControl(Resources.MarkdownNotPreviewedError); diff --git a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFileHandlerLoaded.cs b/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFileHandlerLoaded.cs deleted file mode 100644 index dec9852dec..0000000000 --- a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFileHandlerLoaded.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Markdown.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when a markdown file is viewed in the preview pane. - /// - [EventData] - public class MarkdownFileHandlerLoaded : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewError.cs b/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewError.cs deleted file mode 100644 index 95268b1619..0000000000 --- a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewError.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Markdown.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when an error occurs while attempting to view a markdown file in the preview pane. - /// - public class MarkdownFilePreviewError : EventBase, IEvent - { - /// - /// Gets or sets the error message. - /// - public string Message { get; set; } - - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance; - } -} diff --git a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewed.cs b/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewed.cs deleted file mode 100644 index e38d2d38ca..0000000000 --- a/src/modules/previewpane/MarkdownPreviewHandler/Telemetry/Events/MarkdownFilePreviewed.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Markdown.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when a markdown file is viewed in the preview pane. - /// - [EventData] - public class MarkdownFilePreviewed : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandlerControl.cs b/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandlerControl.cs index 4068567985..f9b5069e88 100644 --- a/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandlerControl.cs +++ b/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandlerControl.cs @@ -1,17 +1,8 @@ // Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Drawing; -using System.IO; -using System.Runtime.InteropServices.ComTypes; -using System.Windows.Forms; - using Common; -using Common.Utilities; using Microsoft.PowerToys.PreviewHandler.Pdf.Properties; -using Microsoft.PowerToys.PreviewHandler.Pdf.Telemetry.Events; -using Microsoft.PowerToys.Telemetry; using Windows.Data.Pdf; using Windows.Storage.Streams; using Windows.UI.ViewManagement; @@ -158,25 +149,9 @@ namespace Microsoft.PowerToys.PreviewHandler.Pdf memStream.Dispose(); } } - - try - { - PowerToysTelemetry.Log.WriteEvent(new PdfFilePreviewed()); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } - catch (Exception ex) + catch (Exception) { - try - { - PowerToysTelemetry.Log.WriteEvent(new PdfFilePreviewError { Message = ex.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } - Controls.Clear(); _infoBar = GetTextBoxControl(Resources.PdfNotPreviewedError); Controls.Add(_infoBar); diff --git a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFileHandlerLoaded.cs b/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFileHandlerLoaded.cs deleted file mode 100644 index fc2ac2881b..0000000000 --- a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFileHandlerLoaded.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Pdf.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when a pdf file is viewed in the preview pane. - /// - [EventData] - public class PdfFileHandlerLoaded : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewError.cs b/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewError.cs deleted file mode 100644 index 73dec91265..0000000000 --- a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewError.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Pdf.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when an error occurs while attempting to view a markdown file in the preview pane. - /// - public class PdfFilePreviewError : EventBase, IEvent - { - /// - /// Gets or sets the error message. - /// - public string Message { get; set; } - - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance; - } -} diff --git a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewed.cs b/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewed.cs deleted file mode 100644 index 0a223a24b2..0000000000 --- a/src/modules/previewpane/PdfPreviewHandler/Telemetry/Events/PdfFilePreviewed.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Pdf.Telemetry.Events -{ - /// - /// A telemetry event that is triggered when a markdown file is viewed in the preview pane. - /// - [EventData] - public class PdfFilePreviewed : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/QoiPreviewHandler/QoiPreviewHandlerControl.cs b/src/modules/previewpane/QoiPreviewHandler/QoiPreviewHandlerControl.cs index 047a3e614f..29bf8d2d7d 100644 --- a/src/modules/previewpane/QoiPreviewHandler/QoiPreviewHandlerControl.cs +++ b/src/modules/previewpane/QoiPreviewHandler/QoiPreviewHandlerControl.cs @@ -4,8 +4,6 @@ using Common; using Microsoft.PowerToys.FilePreviewCommon; -using Microsoft.PowerToys.PreviewHandler.Qoi.Telemetry.Events; -using Microsoft.PowerToys.Telemetry; namespace Microsoft.PowerToys.PreviewHandler.Qoi { @@ -73,13 +71,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Qoi Resize += FormResized; base.DoPreview(fs); - try - { - PowerToysTelemetry.Log.WriteEvent(new QoiFilePreviewed()); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } catch (Exception ex) { @@ -149,14 +140,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Qoi /// Stream reference to access source file. private void PreviewError(Exception exception, T dataSource) { - try - { - PowerToysTelemetry.Log.WriteEvent(new QoiFilePreviewError { Message = exception.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } - Controls.Clear(); _infoBarAdded = true; AddTextBoxControl(Properties.Resource.QoiNotPreviewedError); diff --git a/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewError.cs b/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewError.cs deleted file mode 100644 index cdc4516fd9..0000000000 --- a/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewError.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Qoi.Telemetry.Events -{ - /// - /// A telemetry event to be raised when an error has occurred in the preview pane. - /// - [EventData] - public class QoiFilePreviewError : EventBase, IEvent - { - /// - /// Gets or sets the error message to log as part of the telemetry event. - /// - public string Message { get; set; } - - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance; - } -} diff --git a/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewed.cs b/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewed.cs deleted file mode 100644 index 273ec8caf0..0000000000 --- a/src/modules/previewpane/QoiPreviewHandler/Telemetry/Events/QoiFilePreviewed.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Qoi.Telemetry.Events -{ - /// - /// A telemetry event to be raised when a Qoi file has been viewed in the preview pane. - /// - [EventData] - public class QoiFilePreviewed : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/SvgPreviewHandler/SvgPreviewControl.cs b/src/modules/previewpane/SvgPreviewHandler/SvgPreviewControl.cs index 095c985896..931946dc0b 100644 --- a/src/modules/previewpane/SvgPreviewHandler/SvgPreviewControl.cs +++ b/src/modules/previewpane/SvgPreviewHandler/SvgPreviewControl.cs @@ -2,14 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Net.Http; using System.Reflection; using System.Runtime.CompilerServices; using Common; using Common.Utilities; -using Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events; -using Microsoft.PowerToys.Telemetry; using Microsoft.Web.WebView2.Core; using Microsoft.Web.WebView2.WinForms; using SvgPreviewHandler; @@ -142,15 +139,8 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg svgData = SvgPreviewHandlerHelper.SwapNamespaces(svgData); svgData = SvgPreviewHandlerHelper.AddStyleSVG(svgData); } - catch (Exception ex) + catch (Exception) { - try - { - PowerToysTelemetry.Log.WriteEvent(new SvgFilePreviewError { Message = ex.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } try @@ -167,13 +157,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg AddWebViewControl(svgData); Resize += FormResized; base.DoPreview(dataSource); - try - { - PowerToysTelemetry.Log.WriteEvent(new SvgFilePreviewed()); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } } catch (Exception ex) { @@ -301,14 +284,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg /// Stream reference to access source file. private void PreviewError(Exception exception, T dataSource) { - try - { - PowerToysTelemetry.Log.WriteEvent(new SvgFilePreviewError { Message = exception.Message }); - } - catch - { // Should not crash if sending telemetry is failing. Ignore the exception. - } - Controls.Clear(); _infoBarAdded = true; AddTextBoxControl(Properties.Resource.SvgNotPreviewedError); diff --git a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFileHandlerLoaded.cs b/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFileHandlerLoaded.cs deleted file mode 100644 index aaea992ba9..0000000000 --- a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFileHandlerLoaded.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events -{ - /// - /// A telemetry event to be raised when a svg file has been viewed in the preview pane. - /// - [EventData] - public class SvgFileHandlerLoaded : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewError.cs b/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewError.cs deleted file mode 100644 index daed435502..0000000000 --- a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewError.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events -{ - /// - /// A telemetry event to be raised when an error has occurred in the preview pane. - /// - [EventData] - public class SvgFilePreviewError : EventBase, IEvent - { - /// - /// Gets or sets the error message to log as part of the telemetry event. - /// - public string Message { get; set; } - - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServicePerformance; - } -} diff --git a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewed.cs b/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewed.cs deleted file mode 100644 index 5348bcd466..0000000000 --- a/src/modules/previewpane/SvgPreviewHandler/Telemetry/Events/SvgFilePreviewed.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.Tracing; - -using Microsoft.PowerToys.Telemetry; -using Microsoft.PowerToys.Telemetry.Events; - -namespace Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events -{ - /// - /// A telemetry event to be raised when a svg file has been viewed in the preview pane. - /// - [EventData] - public class SvgFilePreviewed : EventBase, IEvent - { - /// - public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; - } -} diff --git a/src/modules/previewpane/powerpreview/pch.h b/src/modules/previewpane/powerpreview/pch.h index cace4c2c94..2f130e79fa 100644 --- a/src/modules/previewpane/powerpreview/pch.h +++ b/src/modules/previewpane/powerpreview/pch.h @@ -4,5 +4,4 @@ #include #include #include -#include diff --git a/src/modules/previewpane/powerpreview/powerpreview.cpp b/src/modules/previewpane/powerpreview/powerpreview.cpp index 1eef1f0398..84d2a590dc 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.cpp +++ b/src/modules/previewpane/powerpreview/powerpreview.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/src/modules/previewpane/powerpreview/trace.cpp b/src/modules/previewpane/powerpreview/trace.cpp index 903ecff487..6bd46ed45b 100644 --- a/src/modules/previewpane/powerpreview/trace.cpp +++ b/src/modules/previewpane/powerpreview/trace.cpp @@ -2,6 +2,8 @@ #include "trace.h" #include +#include + /* * * This file captures the telemetry for the File Explorer Custom Renders project. @@ -19,19 +21,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EnabledPowerPreview(bool enabled) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_Enabled", TraceLoggingBoolean(enabled, "Enabled"), @@ -42,7 +34,7 @@ void Trace::EnabledPowerPreview(bool enabled) void Trace::PowerPreviewSettingsUpdated(LPCWSTR SettingsName, bool oldState, bool newState, bool globalState) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_TweakUISettings_SuccessfullyUpdatedSettings", TraceLoggingWideString(SettingsName, "Previewer_Settings_Name"), @@ -56,7 +48,7 @@ void Trace::PowerPreviewSettingsUpdated(LPCWSTR SettingsName, bool oldState, boo void Trace::PowerPreviewSettingsUpdateFailed(LPCWSTR SettingsName, bool oldState, bool newState, bool globalState) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_TweakUISettings_FailedUpdatingSettings", TraceLoggingWideString(SettingsName, "Previewer_Settings_Name"), @@ -70,7 +62,7 @@ void Trace::PowerPreviewSettingsUpdateFailed(LPCWSTR SettingsName, bool oldState void Trace::SetConfigInvalidJSON(const char* exceptionMessage) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_TweakUISettings_SetConfig__InvalidJSONGiven", TraceLoggingString(exceptionMessage, "ExceptionMessage"), @@ -81,7 +73,7 @@ void Trace::SetConfigInvalidJSON(const char* exceptionMessage) void Trace::Destroyed() { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_TweakUISettings_Destroyed", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -89,9 +81,9 @@ void Trace::Destroyed() TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } -void Trace::InitSetErrorLoadingFile(const char* exceptionMessage) +void Trace::InitSetErrorLoadingFile(const char* exceptionMessage) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "PowerPreview_TweakUISettings_InitSet__ErrorLoadingFile", TraceLoggingString(exceptionMessage, "ExceptionMessage"), @@ -99,4 +91,3 @@ void Trace::InitSetErrorLoadingFile(const char* exceptionMessage) TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); } - diff --git a/src/modules/previewpane/powerpreview/trace.h b/src/modules/previewpane/powerpreview/trace.h index 6899bcdec1..8cd33fee52 100644 --- a/src/modules/previewpane/powerpreview/trace.h +++ b/src/modules/previewpane/powerpreview/trace.h @@ -1,10 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); static void SetConfigInvalidJSON(const char* exceptionMessage); static void InitSetErrorLoadingFile(const char* exceptionMessage); static void EnabledPowerPreview(bool enabled); diff --git a/src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs b/src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs index 34de7f1752..abcbbfd09b 100644 --- a/src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs +++ b/src/modules/registrypreview/RegistryPreview/MainWindow.Events.cs @@ -28,6 +28,7 @@ namespace RegistryPreview { // Save window placement SaveWindowPlacementFile(settingsFolder, windowPlacementFile); + (Application.Current as App).EtwTrace?.Dispose(); } } } diff --git a/src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/App.xaml.cs b/src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/App.xaml.cs index a6a3898f0f..6930d8bc98 100644 --- a/src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/App.xaml.cs +++ b/src/modules/registrypreview/RegistryPreview/RegistryPreviewXAML/App.xaml.cs @@ -6,6 +6,7 @@ using System; using System.Web; using ManagedCommon; +using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Xaml; using Microsoft.Windows.AppLifecycle; using Windows.ApplicationModel.Activation; @@ -111,5 +112,7 @@ namespace RegistryPreview public static string AppFilename; #pragma warning restore CA2211 // Non-constant fields should not be visible #pragma warning restore SA1401 // Fields should be private + + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); } } diff --git a/src/modules/registrypreview/RegistryPreviewExt/Trace.cpp b/src/modules/registrypreview/RegistryPreviewExt/Trace.cpp index 7dda85e43e..870669606b 100644 --- a/src/modules/registrypreview/RegistryPreviewExt/Trace.cpp +++ b/src/modules/registrypreview/RegistryPreviewExt/Trace.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -8,20 +10,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has enabled or disabled the app void Trace::EnableRegistryPreview(_In_ bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "RegistryPreview_EnableRegistryPreview", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -32,7 +24,7 @@ void Trace::EnableRegistryPreview(_In_ bool enabled) noexcept // Log that the user tried to activate the app void Trace::ActivateEditor() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "RegistryPreview_Activate", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), diff --git a/src/modules/registrypreview/RegistryPreviewExt/Trace.h b/src/modules/registrypreview/RegistryPreviewExt/Trace.h index d2cda345d8..7e08386e9c 100644 --- a/src/modules/registrypreview/RegistryPreviewExt/Trace.h +++ b/src/modules/registrypreview/RegistryPreviewExt/Trace.h @@ -1,11 +1,10 @@ #pragma once -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); - // Log if the user has enabled or disabled the app static void EnableRegistryPreview(const bool enabled) noexcept; diff --git a/src/modules/registrypreview/RegistryPreviewExt/pch.h b/src/modules/registrypreview/RegistryPreviewExt/pch.h index be72eb015e..6b4ad38c10 100644 --- a/src/modules/registrypreview/RegistryPreviewExt/pch.h +++ b/src/modules/registrypreview/RegistryPreviewExt/pch.h @@ -9,7 +9,6 @@ #include -#include #include //#include #include diff --git a/src/modules/videoconference/VideoConferenceModule/pch.h b/src/modules/videoconference/VideoConferenceModule/pch.h index 3f4849aa44..7c614d9a5c 100644 --- a/src/modules/videoconference/VideoConferenceModule/pch.h +++ b/src/modules/videoconference/VideoConferenceModule/pch.h @@ -21,5 +21,3 @@ #include #include - -#include diff --git a/src/modules/videoconference/VideoConferenceModule/trace.cpp b/src/modules/videoconference/VideoConferenceModule/trace.cpp index 889cca2a15..043c6b30e7 100644 --- a/src/modules/videoconference/VideoConferenceModule/trace.cpp +++ b/src/modules/videoconference/VideoConferenceModule/trace.cpp @@ -2,6 +2,8 @@ #include "trace.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -9,20 +11,10 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() noexcept -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() noexcept -{ - TraceLoggingUnregister(g_hProvider); -} - // Log if the user has VCM enabled or disabled void Trace::EnableVideoConference(const bool enabled) noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "VideoConference_EnableVideoConference", ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), @@ -34,7 +26,7 @@ void Trace::SettingsChanged(const struct VideoConferenceSettings& settings) noex { bool CustomOverlayImage = (settings.imageOverlayPath.length() > 0); - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "VideoConference_SettingsChanged", TraceLoggingWideString(settings.toolbarPositionString.c_str(), "ToolbarPosition"), @@ -47,7 +39,7 @@ void Trace::SettingsChanged(const struct VideoConferenceSettings& settings) noex void Trace::MicrophoneMuted() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "VideoConference_MicrophoneMuted", TraceLoggingBoolean(true, "MicrophoneMuted"), @@ -58,7 +50,7 @@ void Trace::MicrophoneMuted() noexcept void Trace::CameraMuted() noexcept { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "VideoConference_CameraMuted", TraceLoggingBoolean(true, "CameraMuted"), diff --git a/src/modules/videoconference/VideoConferenceModule/trace.h b/src/modules/videoconference/VideoConferenceModule/trace.h index 5d42709be2..0a9f193e69 100644 --- a/src/modules/videoconference/VideoConferenceModule/trace.h +++ b/src/modules/videoconference/VideoConferenceModule/trace.h @@ -1,11 +1,11 @@ #pragma once #include "VideoConferenceModule.h" -class Trace +#include + +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider() noexcept; - static void UnregisterProvider() noexcept; static void EnableVideoConference(const bool enabled) noexcept; static void SettingsChanged(const struct VideoConferenceSettings &settings) noexcept; static void MicrophoneMuted() noexcept; diff --git a/src/runner/general_settings.cpp b/src/runner/general_settings.cpp index 9925308507..9e3b170feb 100644 --- a/src/runner/general_settings.cpp +++ b/src/runner/general_settings.cpp @@ -65,7 +65,7 @@ json::JsonObject load_general_settings() show_new_updates_toast_notification = loaded.GetNamedBoolean(L"show_new_updates_toast_notification", true); download_updates_automatically = loaded.GetNamedBoolean(L"download_updates_automatically", true) && check_user_is_admin(); show_whats_new_after_updates = loaded.GetNamedBoolean(L"show_whats_new_after_updates", true); - enable_experimentation = loaded.GetNamedBoolean(L"enable_experimentation",true); + enable_experimentation = loaded.GetNamedBoolean(L"enable_experimentation", true); enable_warnings_elevated_apps = loaded.GetNamedBoolean(L"enable_warnings_elevated_apps", true); return loaded; @@ -241,8 +241,7 @@ void start_enabled_powertoys() { std::wstring disable_module_name{ static_cast(disabled_element.Key()) }; - if (powertoys_gpo_configuration.find(disable_module_name)!=powertoys_gpo_configuration.end() - && (powertoys_gpo_configuration[disable_module_name]==powertoys_gpo::gpo_rule_configured_enabled || powertoys_gpo_configuration[disable_module_name]==powertoys_gpo::gpo_rule_configured_disabled)) + if (powertoys_gpo_configuration.find(disable_module_name) != powertoys_gpo_configuration.end() && (powertoys_gpo_configuration[disable_module_name] == powertoys_gpo::gpo_rule_configured_enabled || powertoys_gpo_configuration[disable_module_name] == powertoys_gpo::gpo_rule_configured_disabled)) { // If gpo forces the enabled setting, no need to check the setting for this PowerToy. It will be applied later on this function. continue; diff --git a/src/runner/main.cpp b/src/runner/main.cpp index dd35697e09..bd7cabdec7 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -303,6 +304,9 @@ toast_notification_handler_result toast_notification_handler(const std::wstring_ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR lpCmdLine, int /*nCmdShow*/) { + Shared::Trace::ETWTrace trace{}; + trace.UpdateState(true); + Gdiplus::GdiplusStartupInput gpStartupInput; ULONG_PTR gpToken; GdiplusStartup(&gpToken, &gpStartupInput, NULL); @@ -437,6 +441,13 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR l openScoobe = false; } + bool dataDiagnosticsDisabledByGpo = powertoys_gpo::getAllowDataDiagnosticsValue() == powertoys_gpo::gpo_rule_configured_disabled; + if (dataDiagnosticsDisabledByGpo) + { + Logger::info(L"Data diagnostics: Data diagnostics is disabled by GPO."); + PTSettingsHelper::save_data_diagnostics(false); + } + if (elevated && with_dont_elevate_arg && !run_elevated_setting) { Logger::info("Scheduling restart as non elevated"); @@ -473,6 +484,9 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR l result = -1; } + trace.Flush(); + trace.UpdateState(false); + // We need to release the mutexes to be able to restart the application if (msi_mutex) { @@ -481,6 +495,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR l if (is_restart_scheduled()) { + modules().clear(); if (!restart_if_scheduled()) { // If it's not possible to restart non-elevated due to some condition in the user's configuration, user should start PowerToys manually. diff --git a/src/runner/pch.h b/src/runner/pch.h index a01e93cc17..537bef12d6 100644 --- a/src/runner/pch.h +++ b/src/runner/pch.h @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/runner/runner.vcxproj b/src/runner/runner.vcxproj index 90129f37f2..a55396a71a 100644 --- a/src/runner/runner.vcxproj +++ b/src/runner/runner.vcxproj @@ -107,6 +107,9 @@ {1d5be09d-78c0-4fd7-af00-ae7c1af7c525} + + {8f021b46-362b-485c-bfba-ccf83e820cbd} + {98537082-0fdb-40de-abd8-0dc5a4269bab} diff --git a/src/runner/settings_window.cpp b/src/runner/settings_window.cpp index 6430824bb1..7e56622443 100644 --- a/src/runner/settings_window.cpp +++ b/src/runner/settings_window.cpp @@ -6,6 +6,7 @@ #include "powertoy_module.h" #include +#include #include "tray_icon.h" #include "general_settings.h" #include "restart_elevated.h" @@ -34,6 +35,7 @@ TwoWayPipeMessageIPC* current_settings_ipc = NULL; std::mutex ipc_mutex; std::atomic_bool g_isLaunchInProgress = false; std::atomic_bool isUpdateCheckThreadRunning = false; +HANDLE g_terminateSettingsEvent = CreateEventW(nullptr, false, false, CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT); json::JsonObject get_power_toys_settings() { @@ -622,9 +624,11 @@ void close_settings_window() { if (g_settings_process_id != 0) { + SetEvent(g_terminateSettingsEvent); wil::unique_handle proc{ OpenProcess(PROCESS_TERMINATE, false, g_settings_process_id) }; if (proc) { + WaitForSingleObject(proc.get(), 1500); TerminateProcess(proc.get(), 0); } } diff --git a/src/runner/trace.cpp b/src/runner/trace.cpp index 8c0dd74b50..1c15092679 100644 --- a/src/runner/trace.cpp +++ b/src/runner/trace.cpp @@ -3,6 +3,8 @@ #include "general_settings.h" +#include + TRACELOGGING_DEFINE_PROVIDER( g_hProvider, "Microsoft.PowerToys", @@ -10,19 +12,9 @@ TRACELOGGING_DEFINE_PROVIDER( (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), TraceLoggingOptionProjectTelemetry()); -void Trace::RegisterProvider() -{ - TraceLoggingRegister(g_hProvider); -} - -void Trace::UnregisterProvider() -{ - TraceLoggingUnregister(g_hProvider); -} - void Trace::EventLaunch(const std::wstring& versionNumber, bool isProcessElevated) { - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "Runner_Launch", TraceLoggingWideString(versionNumber.c_str(), "Version"), @@ -48,7 +40,7 @@ void Trace::SettingsChanged(const GeneralSettings& settings) } } - TraceLoggingWrite( + TraceLoggingWriteWrapper( g_hProvider, "GeneralSettingsChanged", TraceLoggingBoolean(settings.isStartupEnabled, "RunAtStartup"), diff --git a/src/runner/trace.h b/src/runner/trace.h index fe337723d7..3170fa665a 100644 --- a/src/runner/trace.h +++ b/src/runner/trace.h @@ -1,12 +1,12 @@ #pragma once +#include + struct GeneralSettings; -class Trace +class Trace : public telemetry::TraceBase { public: - static void RegisterProvider(); - static void UnregisterProvider(); static void EventLaunch(const std::wstring& versionNumber, bool isProcessElevated); static void SettingsChanged(const GeneralSettings& settings); }; diff --git a/src/settings-ui/Settings.UI/Helpers/ETLConverter.cs b/src/settings-ui/Settings.UI/Helpers/ETLConverter.cs new file mode 100644 index 0000000000..a4b8b57ae8 --- /dev/null +++ b/src/settings-ui/Settings.UI/Helpers/ETLConverter.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using ManagedCommon; + +namespace Microsoft.PowerToys.Settings.UI.Helpers +{ + public class ETLConverter + { + private const int TracerptConversionTimeout = 60000; // 60 seconds in milliseconds + private const string ETLConversionOutputFormat = "xml"; // Assuming XML output format + + private readonly string etwDirPath; + + private readonly string tracerptPath; + + public ETLConverter(string etwDirPath, string tracerptPath) + { + this.etwDirPath = etwDirPath; + this.tracerptPath = tracerptPath; + } + + private bool ETLConversionsFailed { get; set; } + + public async Task ConvertDiagnosticsETLsAsync(CancellationToken cancellationToken = default) + { + var etlConversionTasks = new List(); + var directoryInfo = new DirectoryInfo(etwDirPath); + + foreach (var fileInfo in directoryInfo.GetFiles("*.etl", SearchOption.AllDirectories)) + { + var task = Task.Run(() => ConvertETLAsync(fileInfo.FullName, cancellationToken), cancellationToken); + etlConversionTasks.Add(task); + } + + try + { + await Task.WhenAll(etlConversionTasks); + } + catch (Exception) + { + ETLConversionsFailed = true; + } + + if (ETLConversionsFailed) + { + throw new InvalidOperationException("One or more ETL conversions failed."); + } + } + + private void ConvertETLAsync(string etlFilePathToConvert, CancellationToken cancellationToken) + { + var outputFilePath = Path.ChangeExtension(etlFilePathToConvert, $".{ETLConversionOutputFormat}"); + + if (File.Exists(outputFilePath)) + { + File.Delete(outputFilePath); + } + + var tracerPtArguments = $"\"{etlFilePathToConvert}\" -o \"{outputFilePath}\" -lr -y -of {ETLConversionOutputFormat}"; + + var startInfo = new ProcessStartInfo + { + FileName = tracerptPath + "\\tracerpt.exe", + Arguments = tracerPtArguments, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true, + }; + + using (var process = Process.Start(startInfo)) + { + if (process == null) + { + Logger.LogError("Failed to start tracerpt process."); + } + + var processExited = process.WaitForExit(TracerptConversionTimeout); + + if (!processExited) + { + process.Kill(); + Logger.LogError("ETL conversion process timed out."); + } + + var exitCode = process.ExitCode; + if (exitCode != 0) + { + Logger.LogError($"ETL conversion failed with exit code {exitCode}."); + } + } + } + } +} diff --git a/src/settings-ui/Settings.UI/Helpers/NativeEventWaiter.cs b/src/settings-ui/Settings.UI/Helpers/NativeEventWaiter.cs new file mode 100644 index 0000000000..0aee5d3fd6 --- /dev/null +++ b/src/settings-ui/Settings.UI/Helpers/NativeEventWaiter.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Threading; + +using Microsoft.UI.Dispatching; + +namespace Microsoft.PowerToys.Settings.UI.Helpers +{ + public static class NativeEventWaiter + { + public static void WaitForEventLoop(string eventName, Action callback) + { + var dispatcherQueue = DispatcherQueue.GetForCurrentThread(); + new Thread(() => + { + var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, eventName); + while (true) + { + if (eventHandle.WaitOne()) + { + dispatcherQueue.TryEnqueue(() => callback()); + } + } + }).Start(); + } + } +} diff --git a/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs b/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs index 816b6bcc63..70157075ac 100644 --- a/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs +++ b/src/settings-ui/Settings.UI/Helpers/StartProcessHelper.cs @@ -11,6 +11,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers public static class StartProcessHelper { public const string ColorsSettings = "ms-settings:colors"; + public const string DiagnosticsAndFeedback = "ms-settings:privacy-feedback"; public static string AnimationsSettings => OSVersionHelper.IsWindows11() ? "ms-settings:easeofaccess-visualeffects" diff --git a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs index 4c44dd250b..85f64f62cc 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs @@ -70,6 +70,8 @@ namespace Microsoft.PowerToys.Settings.UI public static Action IPCMessageReceivedCallback { get; set; } + public ETWTrace EtwTrace { get; private set; } = new ETWTrace(); + /// /// Initializes a new instance of the class. /// Initializes the singleton application object. This is the first line of authored code @@ -88,6 +90,13 @@ namespace Microsoft.PowerToys.Settings.UI InitializeComponent(); UnhandledException += App_UnhandledException; + + NativeEventWaiter.WaitForEventLoop( + Constants.PowerToysRunnerTerminateSettingsEvent(), () => + { + EtwTrace?.Dispose(); + Environment.Exit(0); + }); } private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml index b6456d5eb0..b04c800bca 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml @@ -5,6 +5,8 @@ xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls" + xmlns:ui="using:CommunityToolkit.WinUI" mc:Ignorable="d"> @@ -17,6 +19,35 @@ + + + + + + + + + + + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml.cs index d43bda83bf..ba4595ea06 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverview.xaml.cs @@ -2,9 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using global::PowerToys.GPOWrapper; using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; using Microsoft.PowerToys.Settings.UI.Views; +using Microsoft.PowerToys.Telemetry; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; @@ -14,9 +16,46 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views { public OobePowerToysModule ViewModel { get; set; } + private bool _enableDataDiagnostics; + + public bool EnableDataDiagnostics + { + get + { + return _enableDataDiagnostics; + } + + set + { + if (_enableDataDiagnostics != value) + { + _enableDataDiagnostics = value; + + DataDiagnosticsSettings.SetEnabledValue(_enableDataDiagnostics); + + this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () => + { + ShellPage.ShellHandler?.SignalGeneralDataUpdate(); + }); + } + } + } + + public bool ShowDataDiagnosticsSetting => GetIsDataDiagnosticsInfoBarEnabled(); + + private bool GetIsDataDiagnosticsInfoBarEnabled() + { + var isDataDiagnosticsGpoDisallowed = GPOWrapper.GetAllowDataDiagnosticsValue() == GpoRuleConfigured.Disabled; + + return !isDataDiagnosticsGpoDisallowed; + } + public OobeOverview() { this.InitializeComponent(); + + _enableDataDiagnostics = DataDiagnosticsSettings.GetEnabledValue(); + ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModules.Overview]); DataContext = ViewModel; } @@ -31,6 +70,16 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views ViewModel.LogOpeningSettingsEvent(); } + private void GeneralSettingsLaunchButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + if (OobeShellPage.OpenMainWindowCallback != null) + { + OobeShellPage.OpenMainWindowCallback(typeof(GeneralPage)); + } + + ViewModel.LogOpeningSettingsEvent(); + } + protected override void OnNavigatedTo(NavigationEventArgs e) { ViewModel.LogOpeningModuleEvent(); diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml index 06c3b29067..febd14186a 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml @@ -6,18 +6,66 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls" + xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls" + xmlns:ui="using:CommunityToolkit.WinUI" Loaded="Page_Loaded" mc:Ignorable="d"> + + + + + + + + + + + + + + + + + + + + + +