# gpui: Fix crash when opening a popover from inside another popover \(\#60926\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5e982c6bdc315a6d2bb68b3edefae00ceedd35f4

Requested commit: 5e982c6bdc315a6d2bb68b3edefae00ceedd35f4

Commit: 5e982c6bdc315a6d2bb68b3edefae00ceedd35f4

Tree: f65725e5b6619324624104c14aef3da8834f1d56

Author: Danilo Leal

Committer: GitHub

## Message

```
gpui: Fix crash when opening a popover from inside another popover (#60926)

Opening a popover from inside another popover (e.g. the branch picker's
new filter menu, when the picker is hosted in the git panel or title
bar) corrupted the frame-caching bookkeeping for whichever cached view
contained them. The corruption was invisible until a later, unrelated
redraw reused that view's cached subtree, at which point the window
crashed (debug) or could misroute input events (release). Fixed by
processing deferred draws in place so their recorded positions remain
valid across frames; added a regression test reproducing the crash via a
cached panel hosting nested popovers.

Release Notes:

- Fixed the branch picker menu in the Git Panel, which was previously
broken due to popovers-within-popovers not being possible in GPUI.
```

## Parents

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

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