From bf74bc43d4593dcf1f9563e63731265477b8f01c Mon Sep 17 00:00:00 2001 From: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> Date: Fri, 22 Aug 2025 07:55:18 +0200 Subject: [PATCH] [Always On Top] Wait cursor fix (#41091) ## Summary of the Pull Request ## PR Checklist This PR resolves an issue where the wait cursor was incorrectly displayed when the mouse hovered over the Always On Top window border. _0.92.1_ ![before](https://github.com/user-attachments/assets/40640734-7b49-4e50-9415-f005c8689ea9) _PR_ ![after](https://github.com/user-attachments/assets/95c8bf51-7ded-44ae-934a-53c4adf8d9e6) - [x] Closes: #17923 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp b/src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp index 763a9770f7..258beda57d 100644 --- a/src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp +++ b/src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp @@ -246,9 +246,17 @@ LRESULT WindowBorder::WndProc(UINT message, WPARAM wparam, LPARAM lparam) noexce case WM_ERASEBKGND: return TRUE; - // prevent from beeping if the border was clicked + // Prevent from beeping if the border was clicked case WM_SETCURSOR: + { + HCURSOR hCursor = LoadCursorW(nullptr, IDC_ARROW); + if (hCursor) + { + SetCursor(hCursor); + } + return TRUE; + } default: {