Wake idle Wayland windows after asynchronous updates

This commit is contained in:
2026-11-17 02:08:15 -08:00
parent ec97ef00b0
commit d8630c2d52
189 changed files with 98205 additions and 5 deletions
+22
View File
@@ -0,0 +1,22 @@
# GPUI 0.2.2 Wayland idle redraw patch
This directory vendors the published `gpui` 0.2.2 crate unchanged except for
`src/window.rs`, `src/app.rs`, and this note. Upstream source and Apache-2.0
license are retained; see `LICENSE-APACHE` and `.cargo_vcs_info.json`.
Wayland compositors can withhold a pending frame callback after GPUI skips
presenting a clean frame. Later asynchronous view notifications make the scene
dirty but cannot cause a new buffer to be presented, leaving terminal output
and cursor timers visually stalled until unrelated output damage occurs.
The patch tracks when a configured Wayland window stops presenting. At the end
of an app effect cycle, an invalidated idle window draws and presents once,
clearing the idle flag. Normal compositor callbacks then resume. Dirty active
windows remain callback-paced; clean idle windows submit no frames. The flag
starts false, avoiding presentation before the initial Wayland configure.
Other platform backends are unchanged. No foreign Wayland connection or raw
surface manipulation is used.
The optional `scripts/check-wayland-idle.py` exercises an actual headless Weston
window and verifies output repaints after an idle interval without pointer
input or screenshots waking the compositor.