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
+5 -2
View File
@@ -899,8 +899,11 @@ function setupDragDropToMpvQueue(): void {
if (!event.dataTransfer) return;
event.preventDefault();
const droppedVideoPaths = collectDroppedVideoPaths(event.dataTransfer);
const droppedSubtitlePaths = collectDroppedSubtitlePaths(event.dataTransfer);
const resolvedFilePaths = Array.from(event.dataTransfer.files, (file) =>
window.electronAPI.getPathForFile(file),
);
const droppedVideoPaths = collectDroppedVideoPaths(event.dataTransfer, resolvedFilePaths);
const droppedSubtitlePaths = collectDroppedSubtitlePaths(event.dataTransfer, resolvedFilePaths);
const appendDroppedVideos = event.shiftKey;
const loadCommands = buildMpvLoadfileCommands(droppedVideoPaths, appendDroppedVideos);
const subtitleCommands = buildMpvSubtitleAddCommands(droppedSubtitlePaths);