# gpui: Fix stale pending input when a window is blurred \(\#63271\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f66ed399cdde86092af8af3dc7b418abf45f37f8

Requested commit: f66ed399cdde86092af8af3dc7b418abf45f37f8

Commit: f66ed399cdde86092af8af3dc7b418abf45f37f8

Tree: df8d555b5ec81bf7701beeb13f0296f7c4ab46ea

Author: Smit Barmase

Committer: GitHub

## Message

```
gpui: Fix stale pending input when a window is blurred (#63271)

This prepares for the keybinding hints PR.

To reproduce, press `ctrl-b` in a GPUI app with `ctrl-b h` and `ctrl-b
j` bindings, then call `window.blur()`. The live pending state clears,
but observers still report `ctrl-b`.

`Window::blur` now clears pending input and notifies observers after the
current effect cycle. I don't think we currently exercise this path in
Zed, and I was only able to reproduce it with an example GPUI app.

Release Notes:

- N/A
```

## Parents

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

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