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

View file

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