From 840ef21e4de2a3678c25621cf2ae07e643b63c60 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 21 Oct 2025 21:28:21 -0400 Subject: [PATCH] fix(dnd_destination): Don't capture leave events --- src/widget/dnd_destination.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widget/dnd_destination.rs b/src/widget/dnd_destination.rs index 121648a..ccc0fb1 100644 --- a/src/widget/dnd_destination.rs +++ b/src/widget/dnd_destination.rs @@ -359,7 +359,7 @@ impl Widget } return event::Status::Captured; } - Event::Dnd(DndEvent::Offer(id, OfferEvent::Leave)) => { + Event::Dnd(DndEvent::Offer(_, OfferEvent::Leave)) => { if let Some(msg) = state.on_leave(self.on_leave.as_ref().map(std::convert::AsRef::as_ref)) { @@ -380,7 +380,7 @@ impl Widget viewport, ); } - return event::Status::Captured; + return event::Status::Ignored; } Event::Dnd(DndEvent::Offer(id, OfferEvent::Motion { x, y })) if id == Some(my_id) => { if let Some(msg) = state.on_motion( @@ -412,13 +412,13 @@ impl Widget } return event::Status::Captured; } - Event::Dnd(DndEvent::Offer(id, OfferEvent::LeaveDestination)) => { + Event::Dnd(DndEvent::Offer(_, OfferEvent::LeaveDestination)) => { if let Some(msg) = state.on_leave(self.on_leave.as_ref().map(std::convert::AsRef::as_ref)) { shell.publish(msg); } - return event::Status::Captured; + return event::Status::Ignored; } Event::Dnd(DndEvent::Offer(id, OfferEvent::Drop)) if id == Some(my_id) => { if let Some(msg) =