[review-mirror] microsoft/PowerToys#48393 - #64
Conversation
…p moves the cursor (microsoft#48290)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| public static partial class ResultHandler | ||
| { | ||
| /* | ||
| helpers for handling results from Win32 API calls that return an nint value, |
| // foreground window. this is more reliable than other options like | ||
| // AllowSetForegroundWindow (which the runner invalidates by calling | ||
| // SendInput straight after it calls action()). | ||
| BOOL sfwResult = SetForegroundWindow(findData.hwnd); |
| // AllowSetForegroundWindow (which the runner invalidates by calling | ||
| // SendInput straight after it calls action()). | ||
| BOOL sfwResult = SetForegroundWindow(findData.hwnd); | ||
| if (sfwResult) |
| BOOL sfwResult = SetForegroundWindow(findData.hwnd); | ||
| if (sfwResult) | ||
| { | ||
| Logger::trace(L"SetForegroundWindow on WinUI3 window succeeded with result {}", sfwResult); |
| } | ||
| else | ||
| { | ||
| Logger::warn(L"SetForegroundWindow on WinUI3 window failed with result {}. {}", sfwResult, get_last_error_or_default(GetLastError())); |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Ports Mouse Jump from the legacy WinForms UI to a WinUI 3 background process, adds shared model/hotkey libraries + unit tests, and introduces a “kicker” dev tool to launch/activate Mouse Jump without running the full runner app.
Changes:
- Add new WinUI 3 Mouse Jump app and update runner/module launch paths and foreground activation behavior.
- Extract/rename shared models/helpers (e.g.,
MouseJump.Models,ColorHelper) and update Settings UI to use new layout/rendering pipeline. - Add MouseJump Kicker tool + new unit test projects (Models + HotKeys) and adjust spell-check expectations/excludes.
Reviewed changes
Copilot reviewed 150 out of 154 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/MouseJump.Kicker/readme.md | Adds documentation for the new dev “kicker” launcher tool. |
| tools/MouseJump.Kicker/Program.cs | Adds WinForms entry point for the kicker app. |
| tools/MouseJump.Kicker/KickerForm.cs | Implements launching Mouse Jump WinUI3 and signaling the activation event. |
| tools/MouseJump.Kicker/MouseJump.Kicker.slnx | Adds a standalone solution definition for the kicker tool. |
| tools/MouseJump.Kicker/MouseJump.Kicker.csproj | Adds new kicker project configuration. |
| tools/MouseJump.Kicker/NativeMethods/User32/WindowsAndMessaging/User32.SetForegroundWindow.cs | Adds SetForegroundWindow P/Invoke for kicker focus transfer. |
| tools/MouseJump.Kicker/NativeMethods/User32/WindowsAndMessaging/User32.GetWindowThreadProcessId.cs | Adds window->PID lookup P/Invoke for kicker focus logic. |
| tools/MouseJump.Kicker/NativeMethods/User32/WindowsAndMessaging/User32.EnumWindows.cs | Adds EnumWindows P/Invoke for locating UI window by PID. |
| tools/MouseJump.Kicker/NativeMethods/Kernel32/SystemServices/Kernel32.CreateEventW.cs | Adds event creation P/Invoke used to signal Mouse Jump. |
| tools/MouseJump.Kicker/NativeMethods/Kernel32/Security/Kernel32.SECURITY_ATTRIBUTES.cs | Adds SECURITY_ATTRIBUTES struct wrapper. |
| tools/MouseJump.Kicker/NativeMethods/Kernel32/Security/Kernel32.LPSECURITY_ATTRIBUTES.cs | Adds LPSECURITY_ATTRIBUTES wrapper used for CreateEventW. |
| tools/MouseJump.Kicker/NativeMethods/Core/LPVOID.cs | Adds LPVOID pointer wrapper for native interop. |
| tools/MouseJump.Kicker/NativeMethods/Core/LPCWSTR.cs | Adds LPCWSTR wrapper for UTF-16 strings in P/Invoke. |
| src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel_MouseJump.cs | Updates settings preview generation to new models/layout + async rendering. |
| src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml.cs | Switches config color serialization to ColorHelper and new models namespace. |
| src/settings-ui/Settings.UI/PowerToys.Settings.csproj | Adds references to new MouseJump.Common and MouseJump.Models projects. |
| src/settings-ui/Settings.UI/Converters/MouseJumpPreviewTypeConverter.cs | Updates PreviewType model namespace. |
| src/settings-ui/Settings.UI.Library/MouseJumpSettings.cs | Updates default preview style serialization to use ColorHelper. |
| src/runner/main.cpp | Updates module DLL path for MouseJump under WinUI3Apps/. |
| src/modules/MouseUtils/MouseUtils.UITests/MouseUtils.UITests.csproj | Formatting-only changes/improves readability of UI tests project file. |
| src/modules/MouseUtils/MouseJumpUI/Telemetry/MouseJumpTeleportCursorEvent.cs | Moves telemetry event types to WinUI3 namespace + flattens nested class. |
| src/modules/MouseUtils/MouseJumpUI/Telemetry/MouseJumpShowEvent.cs | Moves telemetry event types to WinUI3 namespace + flattens nested class. |
| src/modules/MouseUtils/MouseJumpUI/Helpers/ThrottledActionInvoker.cs | Updates namespace to MouseJump.WinUI3.Helpers. |
| src/modules/MouseUtils/MouseJumpUI/Helpers/SettingsHelper.cs | Updates models namespace + ColorHelper usage + namespace move. |
| src/modules/MouseUtils/MouseJumpUI/Program.cs | Removes the legacy WinForms UI entry point. |
| src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj | Removes the legacy WinForms UI project. |
| src/modules/MouseUtils/MouseJumpUI/MainForm.cs | Removes the legacy WinForms preview UI implementation. |
| src/modules/MouseUtils/MouseJump/dllmain.cpp | Prelaunches WinUI3 UI process and improves foreground window activation reliability. |
| src/modules/MouseUtils/MouseJump/MouseJump.vcxproj | Moves MouseJump DLL output under WinUI3Apps\ and pins toolset. |
| src/modules/MouseUtils/MouseJump.WinUI3/app.manifest | Adds WinUI3 app manifest with per-monitor V2 DPI awareness. |
| src/modules/MouseUtils/MouseJump.WinUI3/UI/PreviewWindow.xaml | Adds WinUI3 preview window XAML. |
| src/modules/MouseUtils/MouseJump.WinUI3/Program.cs | Adds WinUI3 process entry point with GPO + DPI checks + single-instance behavior. |
| src/modules/MouseUtils/MouseJump.WinUI3/NativeMethods.txt | Defines CsWin32 method/type list for WinUI3 project. |
| src/modules/MouseUtils/MouseJump.WinUI3/MouseJump.WinUI3.csproj | Adds new WinUI3 project and references shared components. |
| src/modules/MouseUtils/MouseJump.WinUI3/Helpers/MouseJumpEventLoop.cs | Adds named-event loop helpers for sync + async callbacks. |
| src/modules/MouseUtils/MouseJump.WinUI3/App.xaml.cs | Adds WinUI3 Application wiring and event handlers for show/terminate events. |
| src/modules/MouseUtils/MouseJump.WinUI3/App.xaml | Adds WinUI3 application resource dictionary. |
| src/modules/MouseUtils/MouseJump.Models/ViewModel/ScreenViewModel.cs | Adds view model structure for screen layout rendering. |
| src/modules/MouseUtils/MouseJump.Models/ViewModel/FormViewModel.cs | Adds view model for preview form bounds + canvas layout. |
| src/modules/MouseUtils/MouseJump.Models/ViewModel/DeviceViewModel.cs | Adds view model for device layout (contains screens). |
| src/modules/MouseUtils/MouseJump.Models/ViewModel/CanvasViewModel.cs | Adds view model for full canvas layout (contains devices). |
| src/modules/MouseUtils/MouseJump.Models/NintJsonConverter.cs | Adds JSON converter for nint serialization. |
| src/modules/MouseUtils/MouseJump.Models/MouseJump.Models.csproj | Adds new models project. |
| src/modules/MouseUtils/MouseJump.Models/Drawing/BoxBounds.cs | Adds richer box-model bounds helpers + creation utilities. |
| src/modules/MouseUtils/MouseJump.Models/Display/HighDpiMode.cs | Adds DPI mode enum aligned with WinForms semantics. |
| src/modules/MouseUtils/MouseJump.Models/Display/DisplayInfo.cs | Adds display info container for devices/screens. |
| src/modules/MouseUtils/MouseJump.Models/Display/DeviceInfo.cs | Adds device info record and combined bounds helper. |
| src/modules/MouseUtils/MouseJump.Models/Display/DesktopInfo.cs | Adds desktop info model and combined bounds helper. |
| src/modules/MouseUtils/MouseJump.Models.UnitTests/MouseJump.Models.UnitTests.csproj | Adds new MSTest project for MouseJump.Models. |
| src/modules/MouseUtils/MouseJump.Models.UnitTests/MSTestSettings.cs | Enables MSTest parallelization for model tests. |
| src/modules/MouseUtils/MouseJump.Models.UnitTests/Drawing/BoxBoundsTests.cs | Adds unit tests for BoxBounds creation methods. |
| src/modules/MouseUtils/MouseJump.HotKeys/NativeMethods.txt | Adds CsWin32 method/type list for hotkeys project. |
| src/modules/MouseUtils/MouseJump.HotKeys/MouseJump.HotKeys.csproj | Adds new hotkeys library. |
| src/modules/MouseUtils/MouseJump.HotKeys/Keystroke.cs | Adds keystroke parser/formatter utility. |
| src/modules/MouseUtils/MouseJump.HotKeys/KeyModifiers.cs | Adds hotkey modifier flags bound to Win32 constants. |
| src/modules/MouseUtils/MouseJump.HotKeys.UnitTests/MouseJump.HotKeys.UnitTests.csproj | Adds unit tests project for hotkeys. |
| src/modules/MouseUtils/MouseJump.HotKeys.UnitTests/KeystrokeTests.cs | Adds keystroke parsing tests. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SetCursorPos.cs | Removes legacy hand-rolled P/Invoke (migrating to CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs | Removes legacy enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetSystemMetrics.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetDesktopWindow.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/WindowsAndMessaging/User32.GetCursorPos.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.SendInput.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSE_EVENT_FLAGS.cs | Removes legacy flags enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.MOUSEINPUT.cs | Removes legacy struct (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.LPINPUT.cs | Removes legacy LPINPUT helper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.KEYBDINPUT.cs | Removes legacy struct (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT_TYPE.cs | Removes legacy enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.INPUT.cs | Removes legacy struct (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/UI/Input/KeyboardAndMouse/User32.HARDWAREINPUT.cs | Removes legacy struct (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.ReleaseDC.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MonitorFromPoint .cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_INFO_FLAGS.cs | Removes legacy flags enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITOR_FROM_FLAGS.cs | Removes legacy enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORINFO.cs | Removes legacy struct (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.MONITORENUMPROC .cs | Removes legacy delegate type (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.LPMONITORINFO.cs | Removes legacy pointer helper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetWindowDC.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.GetMonitorInfoW.cs | Repurposes file content (now declares Kernel32 SetEvent in kicker namespace). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/User32/Graphics/Gdi/User32.EnumDisplayMonitors.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Libraries.cs | Changes native library constants and namespace. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.StretchBlt.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.SetStretchBltMode.cs | Removes legacy P/Invoke (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.STRETCH_BLT_MODE.cs | Removes legacy enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Gdi32/Graphics/Gdi/Gdi32.ROP_CODE.cs | Removes legacy enum (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/WORD.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/ULONG_PTR.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/UINT.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/RECT.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/POINT.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPRECT.cs | Removes legacy pointer helper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPPOINT.cs | Removes legacy pointer helper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPCRECT.cs | Removes legacy pointer helper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LPARAM.cs | Refactors LPARAM wrapper and changes namespace. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/LONG.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HWND.cs | Refactors HWND wrapper and changes namespace. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HMONITOR.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HDC.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/HANDLE.cs | Refactors HANDLE wrapper and changes namespace. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/DWORD.cs | Migrates DWORD helper and changes marshaling call. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/CRECT.cs | Removes legacy core type wrapper (replaced by CsWin32). |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods/Core/BOOL.cs | Moves BOOL wrapper namespace. |
| src/modules/MouseUtils/MouseJump.Common/NativeMethods.txt | Adds/updates CsWin32 native method/type list for common project. |
| src/modules/MouseUtils/MouseJump.Common/MouseJump.Common.csproj | Updates output path, enables CsWin32 + System.Drawing, and references models project. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/PreviewStyle.cs | Moves PreviewStyle into Models and adds ExtraColors. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/PaddingStyle.cs | Moves styles namespace to MouseJump.Models.Styles. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/MarginStyle.cs | Moves styles namespace to MouseJump.Models.Styles. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/BoxStyle.cs | Adds IsEmpty to BoxStyle and updates Empty construction. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/BorderStyle.cs | Moves style namespace and adds WithColor. |
| src/modules/MouseUtils/MouseJump.Common/Models/Styles/BackgroundStyle.cs | Moves style namespace. |
| src/modules/MouseUtils/MouseJump.Common/Models/Settings/PreviewType.cs | Moves PreviewType namespace to MouseJump.Models.Settings. |
| src/modules/MouseUtils/MouseJump.Common/Models/Layout/PreviewLayout.cs | Removes old PreviewLayout model (replaced with viewmodels/layouts). |
| src/modules/MouseUtils/MouseJump.Common/Models/Drawing/SizeInfo.cs | Moves drawing types namespace and adjusts API surface (e.g., MoveTo, ScaleToFit overload). |
| src/modules/MouseUtils/MouseJump.Common/Models/Drawing/ScreenInfo.cs | Moves ScreenInfo into the new display model and updates JSON representation. |
| src/modules/MouseUtils/MouseJump.Common/Models/Drawing/RectangleInfo.cs | Moves drawing types namespace and adds new helpers (Intersect, MoveInside, Union(IEnumerable<>), etc.). |
| src/modules/MouseUtils/MouseJump.Common/Models/Drawing/PointInfo.cs | Moves drawing types namespace and adds new helpers (Subtract, multiple Offset overloads). |
| src/modules/MouseUtils/MouseJump.Common/Models/Drawing/BoxBounds.cs | Removes old BoxBounds in favor of the new one in Models. |
| src/modules/MouseUtils/MouseJump.Common/Interop/Win32WindowProc.cs | Adds WNDPROC lifetime wrapper for safe interop. |
| src/modules/MouseUtils/MouseJump.Common/Interop/Win32WindowClass.cs | Adds window class wrapper to pair atom + proc lifetime. |
| src/modules/MouseUtils/MouseJump.Common/Interop/Win32Window.cs | Adds window wrapper for managed consumption. |
| src/modules/MouseUtils/MouseJump.Common/Interop/Win32SafeHandle.cs | Adds generic SafeHandle wrapper with optional release delegate. |
| src/modules/MouseUtils/MouseJump.Common/Interop/ResultHandler_uint.cs | Adds uint result handling helpers for Win32 calls. |
| src/modules/MouseUtils/MouseJump.Common/Interop/ResultHandler_nint.cs | Adds nint result handling helpers for Win32 calls. |
| src/modules/MouseUtils/MouseJump.Common/Interop/ResultHandler_int.cs | Adds int result handling helpers for Win32 calls. |
| src/modules/MouseUtils/MouseJump.Common/Imaging/StaticImageRegionCopyService.cs | Updates to new models namespaces and adds needed System.Drawing import. |
| src/modules/MouseUtils/MouseJump.Common/Imaging/SolidColorRegionCopyService.cs | Adds solid-color renderer for testing drawing paths. |
| src/modules/MouseUtils/MouseJump.Common/Imaging/IImageRegionCopyService.cs | Updates signature dependencies (Graphics, new models drawing types). |
| src/modules/MouseUtils/MouseJump.Common/Imaging/DesktopImageRegionCopyService.cs | Migrates to CsWin32 PInvoke and central ResultHandler, adjusts HDC handling. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/Win32Helper.cs | Adds helper for creating message-only windows using CsWin32. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/StyleHelper.cs | Updates styles to include extra colors and uses new models namespaces. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/ScreenHelper.cs | Migrates screen enumeration to CsWin32 (EnumDisplayMonitors, GetMonitorInfo, etc.). |
| src/modules/MouseUtils/MouseJump.Common/Helpers/MouseHelper.cs | Migrates cursor APIs to CsWin32 and adjusts SendInput fallback behavior. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/DrawingHelper.cs | Replaces old PreviewLayout rendering with new Canvas/Device/Screen view model-based rendering (async). |
| src/modules/MouseUtils/MouseJump.Common/Helpers/DpiModeHelper.cs | Adds DPI awareness verification helper for WinUI3 process. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/DeviceHelper.cs | Adds helper to build DisplayInfo and choose activated screen. |
| src/modules/MouseUtils/MouseJump.Common/Helpers/ConfigHelper.cs | Renames ConfigHelper to ColorHelper (file name remains unchanged). |
| src/modules/MouseUtils/MouseJump.Common.UnitTests/MouseJump.Common.UnitTests.csproj | Converts test project to Library output type and updates output paths. |
| src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/SizeInfoTests.cs | Updates test namespaces/usings and DynamicData attribute usage. |
| src/modules/MouseUtils/MouseJump.Common.UnitTests/Models/Drawing/RectangleInfoTests.cs | Updates to MoveInside and new namespaces/DynamicData usage. |
| src/modules/MouseUtils/MouseJump.Common.UnitTests/Helpers/MouseHelperTests.cs | Updates to new models namespaces and DynamicData usage. |
| PowerToys.slnx | Adds new MouseJump WinUI3/Models/HotKeys projects + unit test projects to solution. |
| .github/actions/spell-check/expect.txt | Updates expected spell-check tokens for new codebase terms. |
| .github/actions/spell-check/excludes.txt | Updates spell-check excludes (resource paths + kicker form resx). |
Files not reviewed (2)
- src/modules/MouseUtils/MouseJumpUI/MainForm.Designer.cs: Generated file
- tools/MouseJump.Kicker/KickerForm.Designer.cs: Generated file
Comments suppressed due to low confidence (3)
tools/MouseJump.Kicker/KickerForm.cs:1
LPSECURITY_ATTRIBUTESallocates unmanaged memory (AllocHGlobal) and is never freed, and the event HANDLE returned byCreateEventWis never closed. Please wrap both in a try/finally (or equivalent) soattributes.Free()and aCloseHandle(hEvent)(or SafeHandle-based wrapper) always run, preventing leaks during repeated testing sessions.
tools/MouseJump.Kicker/KickerForm.cs:1Kernel32.SetEventis called here, but the onlySetEventdeclaration in this diff appears under the MouseJump.Common tree and in theMouseJump.Kicker.NativeMethodsnamespace, which suggests the kicker project may not actually compile (method not present in its own NativeMethods). Move/add theSetEventP/Invoke intotools/MouseJump.Kicker/NativeMethods/Kernel32/...(and ensure it’s included by the kicker.csproj) soKernel32.SetEventresolves within the kicker assembly.
tools/MouseJump.Kicker/NativeMethods/Kernel32/SystemServices/Kernel32.CreateEventW.cs:1- The remarks link points to
EnumDisplayMonitors, but this file declaresCreateEventW. Please update the link to the correct Win32 documentation forCreateEventW/CreateEventExto avoid confusing future maintainers.
| using var hModule = PInvoke.GetModuleHandle(null); | ||
| var hInstance = (HINSTANCE)hModule.DangerousGetHandle(); |
| var cbSize = Marshal.SizeOf<INPUT>(); | ||
| var result = PInvoke.SendInput(inputs, cbSize); | ||
| if (result != inputs.Length) | ||
| { | ||
| throw new Win32Exception( | ||
| Marshal.GetLastWin32Error()); | ||
| ResultHandler.HandleFailure(result: result, getLastError: true, memberName: nameof(PInvoke.SendInput)); | ||
| } |
| yield return new ScreenInfo( | ||
| handle: hMonitor, | ||
| primary: monitorInfo.dwFlags.HasFlag(User32.MONITOR_INFO_FLAGS.MONITORINFOF_PRIMARY), | ||
| primary: (monitorInfo.dwFlags & PInvoke.MONITORINFOF_PRIMARY) != 0, | ||
| displayArea: new RectangleInfo( |
|
Thank you for contributing to PowerToys. We've detected that this PR might include a new or modified telemetry event. Please ensure the following before merging:
|
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (86)These words are not needed and should be removedATRIOX Autorun Dedup EXITCOMMAND Gotchas intput LEFTBUTTON MTND NONELEVATED NOTXORPEN nullability pfo SHOWCONTEXTMENU ssf TILLSON TRAYICON UAHINITMENU UAHMEASUREMENUITEM Unsubscribes Uptool VISEGRADRELAY WKSGTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:yeelam-gordon/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/yeelam-gordon/PowerToys/actions/runs/29195260809/attempts/1' &&
git commit -m 'Update check-spelling metadata'OR To have the bot accept them for you, comment in the PR quoting the following line: Forbidden patterns 🙅 (8)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Articles generally shouldn't be used without a noun and a verb
Should be
|
| ❌ Errors and Notices | Count |
|---|---|
| ℹ️ candidate-pattern | 3 |
| ❌ check-file-path | 4 |
| ❌ forbidden-pattern | 20 |
See ❌ Event descriptions for more information.
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
Review sandbox mirror of microsoft#48393 (branch
dev/mikeclayton/mousejump-winui-port). Opened by PR-autopilot for Copilot review + local build validation. Not for merge.