mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-14 18:01:58 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user