[v3] Fix not enough memory error when initialising drag and drop on Windows

Fix not enough memory error when initialising drag and drop on windows

Co-authored-by: Andraz Vrhovec <andraz@koofr.net>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Andraz Vrhovec 2025-12-12 19:35:39 +01:00 committed by GitHub
commit 54942d4f34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1967,6 +1967,10 @@ func (w *windowsWebviewWindow) setupChromium() {
globalApplication.handleFatalError(err)
}
}
// Initialize OLE for drag-and-drop operations
w32.OleInitialise()
w.dropTarget = w32.NewDropTarget()
w.dropTarget.OnDrop = func(files []string, x int, y int) {
w.parent.emit(events.Windows.WindowDragDrop)