Fix overlay bounds handling and tests

This commit is contained in:
AntimonyBullets committed 2026-11-10 16:10:24 +05:30
1 parent 83f25e321f
commit 2eee9afd9b
3 files changed
+9 -1

No files matched your search

+5
View File
@@ -11,6 +11,11 @@ vi.mock("electron", () => ({
},
}));
vi.mock("../../windows", () => ({
getHudOverlayInteractiveBounds: vi.fn(() => null),
getHudOverlayWindow: vi.fn(() => null),
}));
import {
repairBundledUiohookBinaryForCurrentArch,
shouldStartGlobalInteractionHook,
+3 -1
View File
@@ -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,
+1
View File
@@ -199,6 +199,7 @@ function LaunchWindowContent() {
recordingHudOffset,
recordingWebcamPreviewContainerRef,
showRecordingWebcamPreview,
webcamPreview.webcamPreviewOffset,
]);
const { handleHudMouseEnter, handleHudMouseLeave, beginInteractiveHudAction } =