diff --git a/src/dnd/mod.rs b/src/dnd/mod.rs index 3cfd8ea..77656fc 100644 --- a/src/dnd/mod.rs +++ b/src/dnd/mod.rs @@ -65,7 +65,7 @@ pub enum SourceEvent { /// If [`None`], no mime types are accepted. Mime(Option), /// DnD Dropped. The operation is still ongoing until receiving a - /// [`Finished`] event. + /// [`SourceEvent::Finished`] event. Dropped, } @@ -88,7 +88,7 @@ pub enum OfferEvent { /// An offer was dropped Drop, /// If the selected action is ASK, the user must be presented with a choice. - /// [`Clipboard::set_actions`] should then be called before data can be + /// [`Clipboard::set_action`] should then be called before data can be /// requested and th DnD operation can be finished. SelectedAction(DndAction), Data { @@ -97,7 +97,7 @@ pub enum OfferEvent { }, } -/// A rectangle with a logical location and size relative to a [`Surface`] +/// A rectangle with a logical location and size relative to a [`DndSurface`] #[derive(Debug, Default, Clone)] pub struct Rectangle { pub x: f64, @@ -128,7 +128,7 @@ pub struct DndDestinationRectangle { pub enum DndRequest { /// Init DnD - InitDnD(Box + Send>), + InitDnd(Box + Send>), /// Register a surface for receiving Dnd events. Surface(DndSurface, Vec), /// Start a Dnd operation with the given source surface and data. @@ -171,7 +171,7 @@ impl Clipboard { &self, tx: Box + Send>, ) -> Result<(), SendError>> { - self.request_sender.send(crate::worker::Command::DndRequest(DndRequest::InitDnD(tx))) + self.request_sender.send(crate::worker::Command::DndRequest(DndRequest::InitDnd(tx))) } /// Start a DnD operation on the given surface with some data diff --git a/src/dnd/state.rs b/src/dnd/state.rs index d90f291..c6826dd 100644 --- a/src/dnd/state.rs +++ b/src/dnd/state.rs @@ -248,7 +248,7 @@ where pub(crate) fn handle_dnd_request(&mut self, r: DndRequest) { match r { - DndRequest::InitDnD(sender) => self.dnd_state.sender = Some(sender), + DndRequest::InitDnd(sender) => self.dnd_state.sender = Some(sender), DndRequest::Surface(s, dests) => { self.dnd_state.destinations.insert(s.surface.id(), (s, dests)); },