From ba3a4d5aebb08e0f5e50e8a55d123cce9e4dc84f Mon Sep 17 00:00:00 2001 From: Sun Shuang <935213960@qq.com> Date: Sun, 25 Oct 2026 19:28:22 +0800 Subject: [PATCH] fix(hud): keep pointer interaction when recording starts Forcing HUD mouse passthrough on the recording state change made the overlay click-through right after the user pressed Record. The stop button lands almost where the record button was, so the next click fell through to the window below: the timer kept running but the HUD ignored clicks and the native capture could not be stopped. Preserve the hover state reported by the renderer instead, and let the existing mouseleave logic restore passthrough when the pointer leaves the bar. --- electron/windows.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electron/windows.ts b/electron/windows.ts index 745d6caa4..33089bc60 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -745,10 +745,10 @@ export function setHudOverlayRecordingActive(recording: boolean): void { hudOverlayFallbackExpanded = false; applyHudOverlayBounds(); reassertHudOverlayCaptureProtection(); - // Start in passthrough mode. Forwarded pointer movement lets the renderer - // make the visible HUD controls interactive when the pointer reaches them, - // while transparent parts never block the recorded application. - setHudOverlayMousePassthrough(true); + // Keep whatever hover state the renderer last reported. Forcing passthrough + // here made the HUD click-through right after the user pressed record, so the + // stop button swallowed clicks until the pointer moved again. + setHudOverlayMousePassthrough(hudOverlayIgnoringMouse); } export function createUpdateToastWindow(): BrowserWindow {