Skip to content

Commit

Permalink
x11: don't emit DragLeave without DragEnter
Browse files Browse the repository at this point in the history
  • Loading branch information
valadaptive committed Jan 10, 2025
1 parent 6f33aa8 commit 8a1c65e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/platform_impl/linux/x11/event_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,11 @@ impl EventProcessor {
}

if xev.message_type == atoms[XdndLeave] as c_ulong {
if self.dnd.has_entered {
let event = Event::WindowEvent { window_id, event: WindowEvent::DragLeave };
callback(&self.target, event);
}
self.dnd.reset();
let event = Event::WindowEvent { window_id, event: WindowEvent::DragLeave };
callback(&self.target, event);
}
}

Expand Down

0 comments on commit 8a1c65e

Please sign in to comment.