# Fix mouse events when element is occluded \(\#3417\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 75891e83f38c740ec54b4e07e71cfbdd2490c02a

Requested commit: 75891e83f38c740ec54b4e07e71cfbdd2490c02a

Commit: 75891e83f38c740ec54b4e07e71cfbdd2490c02a

Tree: 8368bafa3c485af42188c79704201d7939b032b0

Author: Conrad Irwin

Committer: GitHub

## Message

```
Fix mouse events when element is occluded (#3417)

This commit adds a depth map to the frame so we can find the "top most"
opaque layer by stacking order for a given point.

This lets us determine whether the element being hovered was part of the
given layer in the previous frame, which fixes the hover issue.

Still to do:
* [ ] Fix up mouse events too (I tried this, but it's not working yet,
and I want to understand why)

Release Notes:

- N/A
```

## Parents

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

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

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