From 045d84bde060ca03602dbdac879230b3a2b6f9be Mon Sep 17 00:00:00 2001 From: locphamtran Date: Sun, 16 Aug 2026 16:20:48 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20drag-drop=20MIDI=20from=20Explorer=20on?= =?UTF-8?q?=20Windows=20=E2=80=94=20disable=20Tauri=20drag=5Fdrop=5Fhandle?= =?UTF-8?q?r=20so=20WebView2=20gets=20HTML5=20DnD=20(Ph=C6=B0=C6=A1ng=20?= =?UTF-8?q?=C3=A1n=20A,=20FIX=5FDRAG=5FDROP=5FWINDOWS.md)=20(V10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/lib.rs | 13 +++++++++++++ src-tauri/tauri.conf.json | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 6f86cf3..8edbe7d 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -295,6 +295,19 @@ pub fn run() { restart_bridge_with_sample_rate ]) .setup(|app| { + // V10 (FIX_DRAG_DROP_WINDOWS): disable Tauri's built-in drag-drop + // handler so WebView2 receives OS file drops (HTML5 DnD works). + // Tauri default handler + SetAllowExternalDrop(false) swallows + // Explorer .mid drops — app.jsx onDrop never fires on Windows. + // Builder-only API, so the main window is created here instead of + // tauri.conf.json (config-declared windows cannot disable it). + let _ = tauri::WebviewWindowBuilder::new(app, "main", tauri::WebviewUrl::default()) + .title("Sonic Forge DAW - Professional Desktop Studio") + .inner_size(1440.0, 900.0) + .resizable(true) + .devtools(true) + .disable_drag_drop_handler() + .build()?; let res_dir = app .path() .resource_dir() diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c1f60a7..144726e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,16 +9,6 @@ }, "app": { "withGlobalTauri": true, - "windows": [ - { - "title": "Sonic Forge DAW - Professional Desktop Studio", - "width": 1440, - "height": 900, - "resizable": true, - "fullscreen": false, - "devtools": true - } - ], "security": { "csp": null }