# gpui: Make the Wayland render loop demand-driven \(\#60690\) · gitcafe/zed

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

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

Visibility: public

Requested revision: eb354c8d504071bdb79110a7a5c9d374c2864113

Requested commit: eb354c8d504071bdb79110a7a5c9d374c2864113

Commit: eb354c8d504071bdb79110a7a5c9d374c2864113

Tree: 9448ced90588600242efecb8fcb2ddd35c541033

Author: Neel

Committer: GitHub

## Message

```
gpui: Make the Wayland render loop demand-driven (#60690)

Closes #55345.

Wayland is the only platform whose frame ticks are conditional: a
wl_surface frame callback only arrives after a commit the compositor
goes on to repaint.

GPUI assumed unconditional ticks (any previously our Wayland backend
faked them), so an idle fullscreen window
stopped receiving callbacks and froze until external damage arrived.

This PR makes the Wayland render loop demand-driven, instead parking
when there's nothing to draw, and stops Zed committing empty frames on
every tick as the artificial heartbeat from the compositor.

---

Release Notes:

- Fixed the UI freezing in fullscreen on some Wayland compositors
- Fixed idle windows waking at the display's refresh rate on Wayland

---------

Co-authored-by: Philipp Schaffrath <philipp.schaffrath@gmail.com>
Co-authored-by: Daan De Meyer <daan@amutable.com>
Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
```

## Parents

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

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