renderer: vsync unfocused surfaces while dirty

6ae1784f4

Unfocused surfaces stopped the CVDisplayLink and encoded a GPU
frame on every PTY wakeup. A burst of close writes became that many
Metal submits instead of one vsync.

Keep the link running while the surface is visible and dirty or
animating, whether or not it is focused. Idle surfaces still park.
Focus continues to gate cursor blink, custom-shader animation, and
QoS.
This commit is contained in:
Jesse Miller
2026-08-29 08:14:36 -06:00
parent 4540d499ae
commit 97f57edccc

View File

@@ -1194,8 +1194,6 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
const should_run =
// Non-visible windows never vsync
self.visible and
// Non-focused windows only render on-demand
self.focused and
// Only vsync if we have cell changes or animation
(self.cells_rebuilt or self.animationWake() != null);