Skip to content

Commit

Permalink
docs: clarify drag events
Browse files Browse the repository at this point in the history
Make it clearer that drag events are for dragged *files*, and remove the
outdated bit about spurious DragLeft events.
  • Loading branch information
valadaptive committed Jan 10, 2025
1 parent d714b1c commit 1084930
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub enum WindowEvent {
/// The window has been destroyed.
Destroyed,

/// A drag operation has entered the window.
/// A file drag operation has entered the window.
DragEntered {
/// List of paths that are being dragged onto the window.
paths: Vec<PathBuf>,
Expand All @@ -184,14 +184,14 @@ pub enum WindowEvent {
/// bar, frame, etc).
position: PhysicalPosition<f64>,
},
/// A drag operation has moved over the window.
/// A file drag operation has moved over the window.
DragMoved {
/// (x,y) coordinates in pixels relative to the top-left corner of the window. May be
/// negative on some platforms if something is dragged over a window's decorations (title
/// bar, frame, etc).
position: PhysicalPosition<f64>,
},
/// The drag operation has dropped file(s) on the window.
/// The file drag operation has dropped file(s) on the window.
DragDropped {
/// List of paths that are being dragged onto the window.
paths: Vec<PathBuf>,
Expand All @@ -200,8 +200,7 @@ pub enum WindowEvent {
/// bar, frame, etc).
position: PhysicalPosition<f64>,
},
/// The drag operation has been cancelled or left the window. On some platforms, this may occur
/// even if no other drag events have occurred.
/// The file drag operation has been cancelled or left the window.
DragLeft {
/// (x,y) coordinates in pixels relative to the top-left corner of the window. May be
/// negative on some platforms if something is dragged over a window's decorations (title
Expand Down

0 comments on commit 1084930

Please sign in to comment.