From fed6e523b6c59e90bef9b70cfb61949f4a7f0651 Mon Sep 17 00:00:00 2001 From: leileizhang Date: Wed, 6 Aug 2025 14:12:37 +0800 Subject: [PATCH] Fix: used wrong preview resize event from another handler (#40995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary of the Pull Request Bug: Was using GcodePreviewResizeEvent, which will never work — switched to use Bgcode's own event ## PR Checklist - [ ] Closes: #xxx - [ ] **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 ## AI Summary This pull request makes a minor update to the event handling in the preview pane module. The change updates the event constant used for resizing the preview from `GcodePreviewResizeEvent` to `BgcodePreviewResizeEvent`, likely to improve naming consistency or to support a new event type. --- src/modules/previewpane/BgcodePreviewHandler/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/previewpane/BgcodePreviewHandler/Program.cs b/src/modules/previewpane/BgcodePreviewHandler/Program.cs index f1f1d0ed35..c513ac1e38 100644 --- a/src/modules/previewpane/BgcodePreviewHandler/Program.cs +++ b/src/modules/previewpane/BgcodePreviewHandler/Program.cs @@ -49,7 +49,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Bgcode _previewHandlerControl.DoPreview(filePath); NativeEventWaiter.WaitForEventLoop( - Constants.GcodePreviewResizeEvent(), + Constants.BgcodePreviewResizeEvent(), () => { Rectangle s = default;