mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-08 16:49:50 -07:00
fix(overlay): restore mpv focus and pointer state on macOS (#104)
This commit is contained in:
@@ -54,6 +54,7 @@ type RevealFallbackHandle = NonNullable<Parameters<typeof globalThis.clearTimeou
|
||||
|
||||
export interface OverlayModalRuntimeOptions {
|
||||
onModalStateChange?: (isActive: boolean) => void;
|
||||
onFinalModalClosed?: () => void;
|
||||
scheduleRevealFallback?: (callback: () => void, delayMs: number) => RevealFallbackHandle;
|
||||
clearRevealFallback?: (timeout: RevealFallbackHandle) => void;
|
||||
}
|
||||
@@ -387,8 +388,14 @@ export function createOverlayModalRuntimeService(
|
||||
}
|
||||
modalWindowPrimedForImmediateShow = false;
|
||||
mainWindowMousePassthroughForcedByModal = false;
|
||||
mainWindowHiddenByModal = false;
|
||||
notifyModalStateChange(false);
|
||||
setMainWindowVisibilityForModal(false);
|
||||
try {
|
||||
options.onFinalModalClosed?.();
|
||||
} catch {
|
||||
// Modal state still needs to deactivate if focus handoff fails.
|
||||
} finally {
|
||||
notifyModalStateChange(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user