# gpui: Fix clear drag overlay when external drag ends outside window \(\#45759\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/693962917b5a015949ad2e768bc10ea169d41546)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 693962917b5a015949ad2e768bc10ea169d41546

Requested commit: 693962917b5a015949ad2e768bc10ea169d41546

Commit: 693962917b5a015949ad2e768bc10ea169d41546

Tree: bbc273e391cb4f4ca2c0f95aaaa31dae60906289

Author: Xiaobo Liu

Committer: GitHub

## Message

```
gpui: Fix clear drag overlay when external drag ends outside window (#45759)

Release Notes:

- Fixed clear drag overlay when external drag ends outside window



When dragging files from macOS Finder over the project panel and then
dragging back to Finder, the drag overlay remained visible because the
drag state was not properly cleaned up.

The root cause was that only `draggingExited:` was handled, but not
`draggingEnded:`. On macOS:
- `draggingExited:` is called when the drag leaves the window area
- `draggingEnded:` is called when the drag operation ends entirely

When a user drags a file back to Finder and drops it there,
`draggingEnded:` is called but was not being handled.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
```

## Parents

- [59c021d8dcee7f5b0ac17d298dce96ca8633421e](https://git.cafe/gitcafe/zed/commit/59c021d8dcee7f5b0ac17d298dce96ca8633421e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/693962917b5a015949ad2e768bc10ea169d41546?format=markdown)
