diff --git a/anvil/src/state.rs b/anvil/src/state.rs index 28558bd109f5..23be5cd1e23a 100644 --- a/anvil/src/state.rs +++ b/anvil/src/state.rs @@ -206,7 +206,7 @@ impl ClientDndGrabHandler for AnvilState { }; self.dnd_icon = icon.map(|surface| DndIcon { surface, offset }); } - fn dropped(&mut self, _seat: Seat) { + fn dropped(&mut self, _target: Option, _validated: bool, _seat: Seat) { self.dnd_icon = None; } } diff --git a/src/wayland/selection/data_device/dnd_grab.rs b/src/wayland/selection/data_device/dnd_grab.rs index 1eba7764c9fe..8a909569fce9 100644 --- a/src/wayland/selection/data_device/dnd_grab.rs +++ b/src/wayland/selection/data_device/dnd_grab.rs @@ -263,7 +263,7 @@ where } } - ClientDndGrabHandler::dropped(data, self.seat.clone()); + ClientDndGrabHandler::dropped(data, self.current_focus.clone(), validated, self.seat.clone()); self.icon = None; // in all cases abandon the drop // no more buttons are pressed, release the grab diff --git a/src/wayland/selection/data_device/mod.rs b/src/wayland/selection/data_device/mod.rs index fa8fa9db9dbf..81f61d27ce8e 100644 --- a/src/wayland/selection/data_device/mod.rs +++ b/src/wayland/selection/data_device/mod.rs @@ -140,8 +140,11 @@ pub trait ClientDndGrabHandler: SeatHandler + Sized { /// /// Note that this event will only be generated for client-initiated drag'n'drop session. /// + /// * `target` - The target surface that the contents were dropped on. + /// * `validated` - Whether the drop offer was negotiated and accepted. If `false`, the drop + /// was cancelled or otherwise not successful. /// * `seat` - The seat on which the DnD action was finished. - fn dropped(&mut self, seat: Seat) {} + fn dropped(&mut self, target: Option, validated: bool, seat: Seat) {} } /// Event generated by the interactions of clients with a server initiated drag'n'drop