# gpui: Fix GPUI prompts from bleeding clicks into lower windows \(\#41442\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4bd4d7627602aa7f5168bf1c0f360647035e4426

Requested commit: 4bd4d7627602aa7f5168bf1c0f360647035e4426

Commit: 4bd4d7627602aa7f5168bf1c0f360647035e4426

Tree: eb857d2bebfe8228b20d1d54bfb74acc11b71ef3

Author: tidely

Committer: GitHub

## Message

```
gpui: Fix GPUI prompts from bleeding clicks into lower windows (#41442)

Closes #41180 

When using the fallback prompt renderer (default on Wayland), clicks
would bleed through into underlying windows. When the click happens to
hit a button that creates a prompt, it drops the
`RenderablePromptHandle` which is contained within `Window`, causing the
`Receiver` which returns the index of the clicked `PromptButton` to
return `Err(Canceled)` even though a button was pressed.

This bug appears in the GPUI `window.rs` example, which can be ran using
`cargo run -p gpui --example window`. MacOS has a native
`PromptRenderer` and thus needs additional code to be adjusted to be
able to reproduce the issue.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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