From 13bd5d49b44520d3592568c7cb1e8f9836e22ce8 Mon Sep 17 00:00:00 2001 From: Alan Trebugeais Date: Thu, 7 May 2026 13:15:34 +0200 Subject: [PATCH] fix: popovers issue with mouse passthrough fix: issues with HUD bar not registering clicks properly --- src/App.tsx | 1 + src/components/launch/LaunchWindow.tsx | 29 +++++++++------- src/components/launch/SourceSelector.tsx | 2 +- .../launch/contexts/HudInteractionContext.tsx | 16 +++++++++ .../hooks/useLaunchHudInteractionState.ts | 33 ++++++++++++++++--- .../launch/popovers/PopoverScaffold.tsx | 4 +-- 6 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 src/components/launch/contexts/HudInteractionContext.tsx diff --git a/src/App.tsx b/src/App.tsx index 8c590dca..6b779430 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,6 +36,7 @@ export default function App() { document.documentElement.classList.add("hud-overlay-window"); document.body.classList.add("hud-overlay-window"); document.getElementById("root")?.classList.add("hud-overlay-window"); + window.electronAPI?.hudOverlaySetIgnoreMouse?.(true); } else if (type === "update-toast") { document.documentElement.style.overflow = "visible"; document.body.style.overflow = "visible"; diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx index 28eb2bb7..38e672db 100644 --- a/src/components/launch/LaunchWindow.tsx +++ b/src/components/launch/LaunchWindow.tsx @@ -33,6 +33,7 @@ import { MicPopover } from "./popovers/MicPopover"; import { MorePopover } from "./popovers/MorePopover"; import { SourcePopover } from "./popovers/SourcePopover"; import { WebcamPopover } from "./popovers/WebcamPopover"; +import { HudInteractionContext } from "./contexts/HudInteractionContext"; import { MarqueeText } from "./SourceSelector"; import styles from "./LaunchWindow.module.css"; @@ -173,7 +174,7 @@ function LaunchWindowContent() { recordingWebcamPreviewContainerRef, }); - const { handleHudMouseLeave, beginInteractiveHudAction } = useLaunchHudInteractionState({ + const { handleHudMouseEnter, handleHudMouseLeave, beginInteractiveHudAction } = useLaunchHudInteractionState({ openId, projectBrowserOpen, setProjectBrowserOpen, @@ -428,17 +429,20 @@ function LaunchWindowContent() { const hudMode = finalizing ? "finalizing" : recording ? "recording" : "idle"; return ( -
+ +
window.electronAPI?.hudOverlaySetIgnoreMouse?.(false)} - onMouseLeave={handleHudMouseLeave} + className="flex items-center overflow-visible flex-col-reverse pointer-events-none" > -
+