From e48e24b5bebb3b3143cb8eefcab81f536a8a4b84 Mon Sep 17 00:00:00 2001 From: Ritwik Singh <97968834+datasciritwik@users.noreply.github.com> Date: Sat, 29 Aug 2026 00:02:15 +0530 Subject: [PATCH] Fix HUD overlay blocking the screen while recording While a recording is active, getHudOverlayBounds() passed `isHudOverlayMousePassthroughSupported() && !hudOverlayRecordingActive` as the "passthrough supported" argument. On macOS and Windows this evaluated to false during recording, so the HUD was given the *fallback* geometry -- a fixed 860x540 (or 160px compact) block intended for platforms that cannot make the overlay click-through at all. That left a large, real window sitting over the screen for the whole recording: - The macOS window picker (Cmd+Shift+5) highlighted and selected the HUD instead of the window behind it, so that region could not be captured. - Any moment the renderer legitimately held the mouse (hovering the bar or the webcam preview), the entire block swallowed clicks rather than just the visible controls. - The floating webcam preview could only be dragged within that block, since it is positioned by a CSS transform inside the overlay window. Meanwhile setHudOverlayMousePassthrough() used the real platform check, so the window got fallback bounds with passthrough-style mouse handling -- the two paths disagreed about which mode the overlay was in. Whether the overlay can pass clicks through is a property of the platform, not of whether a recording is in progress, so use the platform check alone. Platforms without passthrough support keep the fallback geometry exactly as before; this only affects the recording case on platforms that already use a click-through overlay when idle. Verified on macOS 15 (arm64) by instrumenting the overlay window: across 204 samples during an active recording the bounds stayed at the full work area (1710x997) and setIgnoreMouseEvents was true for 168 of them, flipping to false only while the pointer was over the bar or the webcam preview. Before the change that same window was the 860x540 block. Co-Authored-By: Claude Opus 5 --- electron/windows.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/electron/windows.ts b/electron/windows.ts index 195178da2..983f20995 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -182,9 +182,16 @@ function getHudOverlayBounds() { recordingActive: hudOverlayRecordingActive, webcamPreviewVisible: hudOverlayWebcamPreviewVisible, }); + // The fallback geometry is a fixed, solid block sized for platforms that + // cannot make the overlay click-through. Using it while recording on a + // platform that *can* pass clicks through leaves a large real window sitting + // over the screen: the OS window picker (Cmd+Shift+5) highlights and selects + // the HUD instead of the app behind it, and any moment the renderer holds the + // mouse the whole block swallows clicks. Passthrough support is a property + // of the platform, not of whether a recording is in progress. return getHudOverlayWindowBounds( workArea, - isHudOverlayMousePassthroughSupported() && !hudOverlayRecordingActive, + isHudOverlayMousePassthroughSupported(), fallbackExpanded, ); }