diff --git a/electron/ipc/cursor/interaction.test.ts b/electron/ipc/cursor/interaction.test.ts index 4ea66241..d64f0d06 100644 --- a/electron/ipc/cursor/interaction.test.ts +++ b/electron/ipc/cursor/interaction.test.ts @@ -11,6 +11,11 @@ vi.mock("electron", () => ({ }, })); +vi.mock("../../windows", () => ({ + getHudOverlayInteractiveBounds: vi.fn(() => null), + getHudOverlayWindow: vi.fn(() => null), +})); + import { repairBundledUiohookBinaryForCurrentArch, shouldStartGlobalInteractionHook, diff --git a/electron/windows.ts b/electron/windows.ts index 96577c13..32bac0e9 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -503,9 +503,11 @@ ipcMain.on( | undefined, ) => { if ( - !bounds || + !Array.isArray(bounds) || bounds.some( (rect) => + !rect || + typeof rect !== "object" || ![rect.left, rect.top, rect.right, rect.bottom].every(Number.isFinite) || rect.right < rect.left || rect.bottom < rect.top, diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx index b26efbdb..68a7758d 100644 --- a/src/components/launch/LaunchWindow.tsx +++ b/src/components/launch/LaunchWindow.tsx @@ -199,6 +199,7 @@ function LaunchWindowContent() { recordingHudOffset, recordingWebcamPreviewContainerRef, showRecordingWebcamPreview, + webcamPreview.webcamPreviewOffset, ]); const { handleHudMouseEnter, handleHudMouseLeave, beginInteractiveHudAction } =