Simulate mouse up if mouse was released outside window, don't report dragged payload if it was dragged from a different window
This commit is contained in:
parent
fa78b597f4
commit
227cc66594
4 changed files with 77 additions and 24 deletions
|
@ -1256,7 +1256,7 @@ impl Pane {
|
|||
fn handle_dropped_item(pane: &WeakViewHandle<Pane>, index: usize, cx: &mut EventContext) {
|
||||
if let Some((_, dragged_item)) = cx
|
||||
.global::<DragAndDrop<Workspace>>()
|
||||
.currently_dragged::<DraggedItem>()
|
||||
.currently_dragged::<DraggedItem>(cx.window_id)
|
||||
{
|
||||
cx.dispatch_action(MoveItem {
|
||||
item_id: dragged_item.item.id(),
|
||||
|
@ -1277,7 +1277,7 @@ impl Pane {
|
|||
if hovered
|
||||
&& cx
|
||||
.global::<DragAndDrop<Workspace>>()
|
||||
.currently_dragged::<DraggedItem>()
|
||||
.currently_dragged::<DraggedItem>(cx.window_id())
|
||||
.is_some()
|
||||
{
|
||||
Some(theme.workspace.tab_bar.drop_target_overlay_color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue