Skip to content

Commit 9a2a2d4

Browse files
authored
fix: call ctx.drop_finish in webkit2gtk drop handler (#1412)
1 parent 7c4f2b7 commit 9a2a2d4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wry": "patch"
3+
---
4+
5+
Fix icons of dragged items getting stuck when using `WebViewBuilder::with_drag_drop_handler` on some distros like Gnome.

src/webkitgtk/drag_drop.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ pub(crate) fn connect_drag_event(webview: &WebView, handler: Box<dyn Fn(DragDrop
9292

9393
{
9494
let controller = controller.clone();
95-
webview.connect_drag_drop(move |_, _, x, y, _| {
95+
webview.connect_drag_drop(move |_, ctx, x, y, time| {
9696
if controller.has_entered() {
9797
if let Some(paths) = controller.take_paths() {
98+
ctx.drop_finish(true, time);
9899
controller.leave();
99100
return controller.call(DragDropEvent::Drop {
100101
paths,

0 commit comments

Comments
 (0)