Skip to content

Commit 8cd7512

Browse files
committed
Disable file drag-and-drop into the window
1 parent 1a8b92c commit 8cd7512

2 files changed

Lines changed: 2 additions & 28 deletions

File tree

frontend/src/App.svelte

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -421,32 +421,6 @@
421421
);
422422
} catch {}
423423
})();
424-
425-
// Wails native file drop handler
426-
(async () => {
427-
try {
428-
const {OnFileDrop} = await import('../wailsjs/runtime/runtime');
429-
OnFileDrop(async (x: number, y: number, paths: string[]) => {
430-
try {
431-
const {HandleDroppedFiles} = await import(
432-
'../wailsjs/go/main/App'
433-
);
434-
const path = await HandleDroppedFiles(paths);
435-
if (path) {
436-
setWallpaperPath(path);
437-
setActiveTab('editor');
438-
showToast(
439-
'Wallpaper selected — click Extract to generate palette'
440-
);
441-
}
442-
} catch (e: any) {
443-
showToast(
444-
'Drop failed: ' + (e?.message || 'unknown error')
445-
);
446-
}
447-
}, true);
448-
} catch {}
449-
})();
450424
});
451425
</script>
452426

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ func main() {
139139
BackgroundColour: bgColour,
140140
OnStartup: app.startup,
141141
DragAndDrop: &options.DragAndDrop{
142-
EnableFileDrop: true,
143-
DisableWebViewDrop: false,
142+
EnableFileDrop: false,
143+
DisableWebViewDrop: true,
144144
},
145145
Bind: []interface{}{
146146
app,

0 commit comments

Comments
 (0)