Rename DndWorkspaceDrag to DndToplevelDrag
This commit is contained in:
parent
b5d2eed726
commit
9b12e76765
2 changed files with 3 additions and 3 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue