Skip to main content

start_file_drag

Function start_file_drag 

pub fn start_file_drag(paths: &[PathBuf]) -> bool
Expand description

Start a drag carrying paths, out of this app and into whatever application the pointer is released over. Call from a press-and-move gesture once the pointer has travelled DRAG_START_THRESHOLD_PX while the button is still held, so the compositor can validate the drag against that implicit grab.

A single file is offered as both its own content type and a URI list; several are offered as a URI list alone, since one pipe can’t carry several files’ bytes. Returns whether a drag started.