# Replace \`Window::parent_view_id\(\)\` with \`Window::current_view\(\)\` \(\#24212\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e768eb0a34382b6f165250552c308610660d7ea3

Requested commit: e768eb0a34382b6f165250552c308610660d7ea3

Commit: e768eb0a34382b6f165250552c308610660d7ea3

Tree: 41cfb0741b33ab2125d00ab4739e78cb86b29c70

Author: Mikayla Maki

Committer: GitHub

## Message

```
Replace `Window::parent_view_id()` with `Window::current_view()` (#24212)

Chatted with @as-cii about limitations in the `Window::parent_view_id()`
API (see:
https://github.com/zed-industries/zed/pull/24182/commits/662153dcfdd80804f4041761c09c4a309d79f6d4)
and realized that I shouldn't be using the dispatch tree's data
structures as they are layout dependent. I've introduced a new stack to
`Window`, `rendered_entity_stack`, that tracks exactly which view's
elements are being drawn. As such, I've also been able to remove the
`Option<>` around the previous API.

Release Notes:

- N/A
```

## Parents

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

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