Skip to content

Commit

Permalink
Merge pull request #216 from mahkoh/jorth/fix-chromium-dnd
Browse files Browse the repository at this point in the history
wayland: send drop event unconditionally on drop
  • Loading branch information
mahkoh authored Jun 14, 2024
2 parents 040ce3c + 5da78ce commit f94f199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ifs/wl_seat/pointer_owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@ impl PointerOwner for DndPointerOwner {
if button != self.button || state != KeyState::Released {
return;
}
let target = self.target.get();
target.node_on_dnd_drop(&self.dnd);
if let Some(src) = &self.dnd.src {
src.on_drop(seat);
}
let should_drop = match &self.dnd.src {
None => true,
Some(s) => s.can_drop(),
};
let target = self.target.get();
if should_drop {
self.target.get().node_on_dnd_drop(&self.dnd);
*seat.dropped_dnd.borrow_mut() = Some(DroppedDnd {
dnd: self.dnd.clone(),
});
Expand Down

0 comments on commit f94f199

Please sign in to comment.