# gpui: Throttle interactive resize events on Wayland \(\#34760\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c251f2a2d4f655b3380b532b74231e214398230f

Requested commit: c251f2a2d4f655b3380b532b74231e214398230f

Commit: c251f2a2d4f655b3380b532b74231e214398230f

Tree: a4096d9270635e8b686bfcb2f95e298588df20ff

Author: Kamal Ahmad

Committer: GitHub

## Message

```
gpui: Throttle interactive resize events on Wayland (#34760)

Wayland compositors can potentially generate thousands of resize
requests when drag-resizing a window, which Zed is unable to keep up
with. This commit changes the behavior to only resize once per vblank
cycle, which helps significantly when resizing the window with a high
poll-rate mouse (1000Hz is common these days)

Here is an example of the behavior pre and post this commit, with some
print-debugging added for tracking resize calls. I have a wireless mouse
with a 2000Hz polling rate and a 165Hz display:

Before: 


https://github.com/user-attachments/assets/4c657f90-5fd2-4809-97ef-363fd48e81b8

After: 


https://github.com/user-attachments/assets/4a0f5fbd-c3c4-40a1-9f71-3b4358c827cf






Closes #20660

Release Notes:

- Improved: Make resizing smoother on Wayland/Linux
```

## Parents

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

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