fix(overlay): restore mpv focus and pointer state on macOS (#104)

This commit is contained in:
2026-05-31 21:25:04 -07:00
committed by GitHub
parent e1ea464bc9
commit b510c54875
21 changed files with 373 additions and 28 deletions
+4
View File
@@ -203,6 +203,9 @@ const onSubtitleSetEvent = createLatestValueIpcListenerWithPayload<SubtitleData>
IPC_CHANNELS.event.subtitleSet,
(payload) => payload as SubtitleData,
);
const onOverlayPointerRecoveryRequestEvent = createQueuedIpcListener(
IPC_CHANNELS.event.overlayPointerRecoveryRequest,
);
const onSubtitleVisibilityEvent = createLatestValueIpcListenerWithPayload<boolean>(
IPC_CHANNELS.event.subtitleVisibility,
(payload) => payload === true,
@@ -225,6 +228,7 @@ const electronAPI: ElectronAPI = {
onSubtitle: (callback: (data: SubtitleData) => void) => {
onSubtitleSetEvent(callback);
},
onOverlayPointerRecoveryRequested: onOverlayPointerRecoveryRequestEvent,
onVisibility: (callback: (visible: boolean) => void) => {
onSubtitleVisibilityEvent(callback);