From 658c40ef1e970b818d1c60bdaa17505468aba48e Mon Sep 17 00:00:00 2001 From: "Haozhou(Evan) Huang" <106489113+EV9H@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:49:45 +0800 Subject: [PATCH] fix(windows): recover HUD input forwarding after startup Re-arm click-through for HUD window after visibility to ensure input is reachable. --- electron/windows.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/electron/windows.ts b/electron/windows.ts index 0b19d5b98..63aa2e856 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -294,7 +294,17 @@ export function createHudOverlayWindow(): BrowserWindow { // window is shown before its first paint. win.once("ready-to-show", () => { applyContentProtection(win, "HUD"); - if (!HEADLESS) win.show(); + if (!HEADLESS) { + win.show(); + // Re-arm click-through after the window is visible. On Windows, the + // forwarded-mouse hook can be installed too early when the renderer's + // initial IPC request arrives while Chromium is still starting up. If + // that request is the only call, the HUD is painted but every control + // remains unreachable because no forwarded pointermove can turn input + // back on. A post-ready call runs after the native window is live and + // gives Electron a reliable chance to install the hook. + win.setIgnoreMouseEvents(true, { forward: true }); + } }); win.webContents.on("did-finish-load", () => {