fix(overlay): support native Wayland file drag-and-drop (#199)

This commit is contained in:
2026-08-15 00:15:38 -07:00
committed by GitHub
parent 7d729cb60c
commit 2174e689a2
6 changed files with 42 additions and 5 deletions
+2 -1
View File
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron';
import { contextBridge, ipcRenderer, IpcRendererEvent, webUtils } from 'electron';
import { resolveOverlayLayerFromArgv } from './preload-args';
import type {
SubtitleData,
@@ -248,6 +248,7 @@ const onSecondarySubtitleModeEvent = createLatestValueIpcListenerWithPayload<Sec
const electronAPI: ElectronAPI = {
getOverlayLayer: () => overlayLayer,
getPathForFile: (file: File) => webUtils.getPathForFile(file),
onSubtitle: (callback: (data: SubtitleData) => void) => {
onSubtitleSetEvent(callback);
},