fix(macos): default overlay to click-through before subtitle hover

- Set shouldUseMacOSMousePassthrough so overlay starts in forward passthrough mode
- Renderer hover tracking re-enables interaction only over subtitle/popup areas
- Update tests to expect mouse-ignore:true:forward instead of mouse-ignore:false:plain
- Add test covering click-through behavior when overlay already had focus
This commit is contained in:
2026-05-15 18:36:19 -07:00
parent 00811922fc
commit b9ca198039
4 changed files with 57 additions and 11 deletions
+5 -4
View File
@@ -98,8 +98,7 @@ export function updateVisibleOverlayVisibility(args: {
const canReportMacOSTargetMinimized =
args.isMacOSPlatform && typeof windowTracker?.isTargetWindowMinimized === 'function';
const isTrackedMacOSTargetMinimized =
canReportMacOSTargetMinimized &&
windowTracker?.isTargetWindowMinimized() === true;
canReportMacOSTargetMinimized && windowTracker?.isTargetWindowMinimized() === true;
const hasTransientMacOSTrackerLoss =
args.isMacOSPlatform &&
canReportMacOSTargetMinimized &&
@@ -117,6 +116,8 @@ export function updateVisibleOverlayVisibility(args: {
!hasTransientMacOSTrackerLoss &&
!isVisibleOverlayFocused &&
!isTrackedMacOSTargetFocused;
// Renderer hover tracking temporarily disables this for subtitle and popup interaction.
const shouldUseMacOSMousePassthrough = args.isMacOSPlatform;
const shouldDefaultToPassthrough =
args.isWindowsPlatform || forceMousePassthrough || shouldReleaseMacOSOverlayLevel;
const windowsForegroundProcessName =
@@ -141,6 +142,7 @@ export function updateVisibleOverlayVisibility(args: {
(args.windowTracker.isTracking() || args.windowTracker.getGeometry() !== null);
const shouldForcePassiveReshow = args.isWindowsPlatform && !wasVisible;
const shouldIgnoreMouseEvents =
shouldUseMacOSMousePassthrough ||
forceMousePassthrough ||
(shouldDefaultToPassthrough && (!isVisibleOverlayFocused || shouldForcePassiveReshow));
const shouldBindTrackedWindowsOverlay = args.isWindowsPlatform && !!args.windowTracker;
@@ -291,8 +293,7 @@ export function updateVisibleOverlayVisibility(args: {
const canReportMacOSTargetMinimized =
args.isMacOSPlatform && typeof args.windowTracker.isTargetWindowMinimized === 'function';
const isTrackedMacOSTargetMinimized =
canReportMacOSTargetMinimized &&
args.windowTracker.isTargetWindowMinimized();
canReportMacOSTargetMinimized && args.windowTracker.isTargetWindowMinimized();
const shouldPreserveTransientTrackedOverlay =
(args.isMacOSPlatform &&
!isTrackedMacOSTargetMinimized &&