Rename DndWorkspaceDrag to DndToplevelDrag

This commit is contained in:
Ian Douglas Scott 2025-02-10 10:11:04 -08:00
parent b5d2eed726
commit 9b12e76765
2 changed files with 3 additions and 3 deletions

View file

@ -97,7 +97,7 @@ enum Msg {
StartDrag(DragSurface), StartDrag(DragSurface),
DndEnter(DropTarget, f64, f64, Vec<String>), DndEnter(DropTarget, f64, f64, Vec<String>),
DndLeave(DropTarget), DndLeave(DropTarget),
DndWorkspaceDrop(DragToplevel), DndToplevelDrop(DragToplevel),
SourceFinished, SourceFinished,
#[allow(dead_code)] #[allow(dead_code)]
NewWorkspace, NewWorkspace,
@ -502,7 +502,7 @@ impl Application for App {
self.drop_target = None; self.drop_target = None;
} }
} }
Msg::DndWorkspaceDrop(_toplevel) => { Msg::DndToplevelDrop(_toplevel) => {
if let Some((DragSurface::Toplevel(handle), _)) = &self.drag_surface { if let Some((DragSurface::Toplevel(handle), _)) = &self.drag_surface {
match self.drop_target.take() { match self.drop_target.take() {
Some( Some(

View file

@ -31,7 +31,7 @@ fn toplevel_dnd_destination<'a>(
cosmic::widget::dnd_destination::dnd_destination_for_data( cosmic::widget::dnd_destination::dnd_destination_for_data(
child, child,
|data: Option<DragToplevel>, _action| match data { |data: Option<DragToplevel>, _action| match data {
Some(toplevel) => Msg::DndWorkspaceDrop(toplevel), Some(toplevel) => Msg::DndToplevelDrop(toplevel),
None => Msg::Ignore, None => Msg::Ignore,
}, },
) )