fix: drag-drop MIDI from Explorer on Windows — disable Tauri drag_drop_handler so WebView2 gets HTML5 DnD (Phương án A, FIX_DRAG_DROP_WINDOWS.md) (V10)
This commit is contained in:
@@ -295,6 +295,19 @@ pub fn run() {
|
|||||||
restart_bridge_with_sample_rate
|
restart_bridge_with_sample_rate
|
||||||
])
|
])
|
||||||
.setup(|app| {
|
.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
|
let res_dir = app
|
||||||
.path()
|
.path()
|
||||||
.resource_dir()
|
.resource_dir()
|
||||||
|
|||||||
@@ -9,16 +9,6 @@
|
|||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"withGlobalTauri": true,
|
"withGlobalTauri": true,
|
||||||
"windows": [
|
|
||||||
{
|
|
||||||
"title": "Sonic Forge DAW - Professional Desktop Studio",
|
|
||||||
"width": 1440,
|
|
||||||
"height": 900,
|
|
||||||
"resizable": true,
|
|
||||||
"fullscreen": false,
|
|
||||||
"devtools": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"security": {
|
"security": {
|
||||||
"csp": null
|
"csp": null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user