UI code for supporting workspace drags

Not used yet.
This commit is contained in:
Ian Douglas Scott 2025-02-10 12:02:36 -08:00
parent 9b12e76765
commit ca5db9cc8e
3 changed files with 88 additions and 18 deletions

View file

@ -47,7 +47,7 @@ use backend::{ToplevelInfo, ZcosmicToplevelHandleV1, ZcosmicWorkspaceHandleV1};
mod dnd;
mod utils;
mod widgets;
use dnd::{DragSurface, DragToplevel, DropTarget};
use dnd::{DragSurface, DragToplevel, DragWorkspace, DropTarget};
#[derive(Clone, Debug, Default, PartialEq, CosmicConfigEntry)]
struct CosmicWorkspacesConfig {
@ -98,6 +98,10 @@ enum Msg {
DndEnter(DropTarget, f64, f64, Vec<String>),
DndLeave(DropTarget),
DndToplevelDrop(DragToplevel),
#[allow(dead_code)]
DndWorkspaceDrag,
#[allow(dead_code)]
DndWorkspaceDrop(DragWorkspace),
SourceFinished,
#[allow(dead_code)]
NewWorkspace,
@ -109,7 +113,7 @@ enum Msg {
Ignore,
}
#[derive(Debug)]
#[derive(Clone, Debug)]
struct Workspace {
name: String,
// img_for_output: HashMap<wl_output::WlOutput, backend::CaptureImage>,
@ -515,7 +519,7 @@ impl Application for App {
output,
));
}
None => {}
Some(DropTarget::WorkspacesBar(_)) | None => {}
}
}
}
@ -608,6 +612,8 @@ impl Application for App {
}
}
}
Msg::DndWorkspaceDrag => {}
Msg::DndWorkspaceDrop(_workspace) => {}
Msg::Ignore => {}
}